php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66575 phpdbg segfaults with Xdebug v2.2.3
Submitted: 2014-01-25 10:22 UTC Modified: 2014-02-02 14:18 UTC
From: clicky at erebot dot net Assigned: krakjoe (profile)
Status: Closed Package: phpdbg
PHP Version: 5.6.0alpha1 OS: Debian 7 (Wheezy)
Private report: No CVE-ID: None
 [2014-01-25 10:22 UTC] clicky at erebot dot net
Description:
------------
Trying to run phpdbg with Xdebug v2.2.3 loaded results in a segfault during startup. See backtrace below.
Disabling Xdebug in php.ini or running phpdbg with option -n as a workaround works correctly.


Test script:
---------------
$ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dom
ereg
filter
gettext
gmp
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xhprof
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]
Xdebug

$ phpdbg
Segmentation fault


Expected result:
----------------
phpdbg should start normally.

Actual result:
--------------
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000771065 in zend_is_auto_global_quick (name=0x7ffff5616977 "_SESSION", name_len=8, hash=249877436177080008)
    at /home/clicky/Documents/git/phpfarm/src/php-5.6.0alpha1-debug/Zend/zend_compile.c:6800
#2  0x00000000007710b2 in zend_is_auto_global (name=0x7ffff5616977 "_SESSION", name_len=8)
    at /home/clicky/Documents/git/phpfarm/src/php-5.6.0alpha1-debug/Zend/zend_compile.c:6810
#3  0x00007ffff55eeb37 in zm_activate_xdebug (type=1, module_number=49)
    at /home/clicky/Documents/git/phpfarm/inst/php-5.6.0alpha1-debug/pear/temp/xdebug/xdebug.c:865
#4  0x0000000000797233 in zend_activate_modules () at /home/clicky/Documents/git/phpfarm/src/php-5.6.0alpha1-debug/Zend/zend_API.c:2403
#5  0x000000000083d559 in main (argc=1, argv=0x7fffffffe1a8)
    at /home/clicky/Documents/git/phpfarm/src/php-5.6.0alpha1-debug/sapi/phpdbg/phpdbg.c:1190


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-27 07:43 UTC] krakjoe@php.net
I'm not able to build xdebug to test:

 cc -I. -I/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-joeBiAsI7/xdebug-2.2.3/include -I/tmp/pear/temp/pear-build-joeBiAsI7/xdebug-2.2.3/main -I/tmp/pear/temp/xdebug -I/opt/php-zts/include/php -I/opt/php-zts/include/php/main -I/opt/php-zts/include/php/TSRM -I/opt/php-zts/include/php/Zend -I/opt/php-zts/include/php/ext -I/opt/php-zts/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -c /tmp/pear/temp/xdebug/xdebug.c  -fPIC -DPIC -o .libs/xdebug.o
/tmp/pear/temp/xdebug/xdebug.c: In function ‘xdebug_zend_startup’:
/tmp/pear/temp/xdebug/xdebug.c:2087:2: error: too few arguments to function ‘zend_startup_module’
 [2014-01-29 08:34 UTC] tyrael@php.net
-Assigned To: +Assigned To: krakjoe
 [2014-02-02 14:16 UTC] krakjoe@php.net
-Status: Assigned +Status: Closed
 [2014-02-02 14:16 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2014-02-02 14:18 UTC] krakjoe@php.net
This is fixed and will be included in the next alpha release, or grab a snapshot.

From a quick test, xdebug enables output buffering, I had to E ob_end_flush(); to see output. But you should get no errors, and can probably change the behaviour of xdebug with configuration, not really sure ...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC