php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56891 lastest CVS crashes after an Exception
Submitted: 2006-03-14 21:58 UTC Modified: 2006-03-15 04:25 UTC
From: judas dot iscariote at gmail dot com Assigned:
Status: Closed Package: Xdebug
PHP Version: 5_1 CVS-2006-03-14 OS: Linux AMD64
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: judas dot iscariote at gmail dot com
New email:
PHP Version: OS:

 

 [2006-03-14 21:58 UTC] judas dot iscariote at gmail dot com
Description:
------------
Im running the bitflux cms http://wiki.bitflux.org/Main_Page
and it worked fine after upgrading my xdebug to the current CVS version (pulled from xdebug.org cvs)

it now segfaults.

ps: xdebug.org bugtracker not working, that's the reason I posted here.


Reproduce code:
---------------
poorly adapted test from the sources of of bitflux CMS, just to reproduce the issue.



<?php
class BxPageNotFoundException extends Exception {

    function __construct($uri) {
        $this->message = "$uri was not found.";
        parent::__construct();
    }
}

throw new BxPageNotFoundException();

?>

Expected result:
----------------
working as a few days ...(works without xdebug loaded)

Warning: Missing argument 1 for BxPageNotFoundException::__construct(), called in /srv/www/htdocs/xdebug-bug.php on line 10 and defined in /srv/www/htdocs/xdebug-bug.php on line 4 Notice: Undefined variable: uri in /srv/www/htdocs/xdebug-bug.php on line 5 Fatal error: Uncaught exception 'BxPageNotFoundException' with message ' was not found.' in /srv/www/htdocs/xdebug-bug.php:10 Stack trace: #0 {main} thrown in /srv/www/htdocs/xdebug-bug.php on line 10

Actual result:
--------------
#0  0x00002aaaabb285de in xdebug_hash_extended_find (h=0x0, str_key=0xca0898 "BxPageNotFoundException",
    str_key_len=23, num_key=0, p=0x7fffffa5cf10) at /home/cristian/xdebug/xdebug_hash.c:207
207             slot = FIND_SLOT(h, str_key, str_key_len, num_key);
(gdb) bt
#0  0x00002aaaabb285de in xdebug_hash_extended_find (h=0x0, str_key=0xca0898 "BxPageNotFoundException",
    str_key_len=23, num_key=0, p=0x7fffffa5cf10) at /home/cristian/xdebug/xdebug_hash.c:207
#1  0x00002aaaabb18063 in xdebug_throw_exception_hook (exception=0xdf01e8) at /home/cristian/xdebug/xdebug.c:1812
#2  0x000000000054cbc5 in zend_throw_exception_internal (exception=0xdf01e8)
    at /usr/src/debug/php-5.1.2/Zend/zend_exceptions.c:50
#3  0x00000000005c01c5 in ZEND_THROW_SPEC_VAR_HANDLER (execute_data=0x7fffffa60660) at zend_vm_execute.h:7016
#4  0x00000000005548b3 in execute (op_array=0xb4ac88) at zend_vm_execute.h:92
#5  0x00002aaaabb16a31 in xdebug_execute (op_array=0xb4ac88) at /home/cristian/xdebug/xdebug.c:1362
#6  0x0000000000554d60 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffa60910) at zend_vm_execute.h:234
#7  0x00000000005548b3 in execute (op_array=0xa58428) at zend_vm_execute.h:92
#8  0x00002aaaabb16a31 in xdebug_execute (op_array=0xa58428) at /home/cristian/xdebug/xdebug.c:1362
#9  0x000000000057ca69 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (execute_data=0x7fffffa60c30) at zend_vm_execute.h:19441
#10 0x00000000005548b3 in execute (op_array=0xa56758) at zend_vm_execute.h:92
#11 0x00002aaaabb16a31 in xdebug_execute (op_array=0xa56758) at /home/cristian/xdebug/xdebug.c:1362
#12 0x0000000000554d60 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffa61770) at zend_vm_execute.h:234
#13 0x00000000005548b3 in execute (op_array=0xabfd58) at zend_vm_execute.h:92
#14 0x00002aaaabb16a31 in xdebug_execute (op_array=0xabfd58) at /home/cristian/xdebug/xdebug.c:1362
#15 0x0000000000554d60 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffa61aa0) at zend_vm_execute.h:234
#16 0x00000000005548b3 in execute (op_array=0x977eb8) at zend_vm_execute.h:92
#17 0x00002aaaabb16a31 in xdebug_execute (op_array=0x977eb8) at /home/cristian/xdebug/xdebug.c:1362
#18 0x0000000000554d60 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffa62150) at zend_vm_execute.h:234
#19 0x00000000005548b3 in execute (op_array=0x9fd828) at zend_vm_execute.h:92
#20 0x00002aaaabb16a31 in xdebug_execute (op_array=0x9fd828) at /home/cristian/xdebug/xdebug.c:1362
#21 0x0000000000554d60 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffa62760) at zend_vm_execute.h:234
#22 0x00000000005548b3 in execute (op_array=0x95af38) at zend_vm_execute.h:92
#23 0x00002aaaabb16a31 in xdebug_execute (op_array=0x95af38) at /home/cristian/xdebug/xdebug.c:1362
#24 0x00000000005381dc in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
    at /usr/src/debug/php-5.1.2/Zend/zend.c:1109
#25 0x00000000004fac63 in php_execute_script (primary_file=0x7fffffa64ed0) at /usr/src/debug/php-5.1.2/main/main.c:1723
#26 0x00000000005c8da5 in main (argc=2, argv=0x7fffffa65088) at /usr/src/debug/php-5.1.2/sapi/cli/php_cli.c:1092


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-14 22:00 UTC] judas dot iscariote at gmail dot com
I mean "it worked fine BEFORE upgrading to current xdebug CVS"
 [2006-03-14 22:41 UTC] judas dot iscariote at gmail dot com
much short test. ;)

# php -r 'throw new Exception();'

Segmentation Fault (core dumped)
 [2006-03-15 02:40 UTC] derick@php.net
Are you sure you did a "make clean" after updating from CVS? I changed a header file and had the same problem without the "make clean"... it's weird that the bugsystem at xdebug.org is offline for you... it works for me. What error do you get?
 [2006-03-15 04:05 UTC] judas dot iscariote at gmail dot com
derick: first ,thanks for your time.


2. I have checked a fresh copy from the CVS right now.
3. I have tested the problem in other system ( to make sure I don't have something broken here)

Sorry to say, I got the same result

php -r 'throw new Exception();'
Segmentation Fault (core dumped)

no other issues, it just crash with any Exception, code without Exceptions works fine.

tested both SUSE 64bit and slackware 32 bit.
GCC 4.0.2

About xdebug.org BT, it's now working for me.
 [2006-03-15 04:15 UTC] derick@php.net
Right, I can reproduce this :)
 [2006-03-15 04:22 UTC] derick@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 [2006-03-15 04:25 UTC] judas dot iscariote at gmail dot com
yes, It works now. :D
thanks Derick.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 01:03:35 2021 UTC