php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18821 CLI crashes with 'echo "";' as with every other command as well
Submitted: 2002-08-08 21:30 UTC Modified: 2002-08-09 08:44 UTC
From: eru@php.net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4CVS-2002-08-09 OS: RedHat 7.3 w/ 2.4.18-5smp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: eru@php.net
New email:
PHP Version: OS:

 

 [2002-08-08 21:30 UTC] eru@php.net
Dunno why it does, tested on a WinXP too with CVS from yesterday, works like a charm.

(gdb) run -r 'echo E_ALL & ~E_NOTICE;'
Starting program: /usr/local/bin/php -r 'echo E_ALL & ~E_NOTICE;'

Program received signal SIGSEGV, Segmentation fault.
0x081cf90f in zend_llist_destroy (l=0x8267260) at /usr/local/src/cvs/php4/Zend/zend_llist.c:110
110                     next = current->next;
(gdb) bt
#0  0x081cf90f in zend_llist_destroy (l=0x8267260) at /usr/local/src/cvs/php4/Zend/zend_llist.c:110
#1  0x081c613e in shutdown_compiler () at /usr/local/src/cvs/php4/Zend/zend_compile.c:118
#2  0x081d8265 in zend_deactivate () at /usr/local/src/cvs/php4/Zend/zend.c:599
#3  0x081a39d3 in php_request_shutdown (dummy=0x0) at /usr/local/src/cvs/php4/main/main.c:865
#4  0x081f1e48 in main (argc=3, argv=0xbffff924) at /usr/local/src/cvs/php4/sapi/cli/php_cli.c:723
#5  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6

Additional info available at http://zyanka.li/phpinfo.html

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-09 02:36 UTC] edink@php.net
Hm, cannot reproduce this with a simple configure line. Could you try to recompile with just ./configure --enable-dedug and see if it still crashes?

If it doesn't could you try locating which extension causes the trouble?
 [2002-08-09 06:33 UTC] eru@php.net
./configure --enable-debug

(gdb) run -r 'echo "";'
Starting program: /usr/local/src/cvs/php4/sapi/cli/php -r 'echo "";'

Program received signal SIGSEGV, Segmentation fault.
0x0816313f in zend_llist_destroy (l=0x81f5020) at /usr/local/src/cvs/php4/Zend/zend_llist.c:110
110                     next = current->next;

same backtrace as last time...

I tested various commands like php -r 'phpinfo();' and even php -r '' segfaults...

 [2002-08-09 07:26 UTC] sander@php.net
I've got the same problem on my local box. The problem disappears when configuring without debug.

The problem is, that for some reason current points to 0x1 when current == l->tail, while it should point to 0x0.
 [2002-08-09 08:44 UTC] eru@php.net
The error is in Dericks xdebug-extension, which I load dynamically in my php.ini

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 07:01:30 2024 UTC