View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000340 | Xdebug | public | 2007-11-23 19:06 | 2009-07-09 17:53 | |
Reporter | s0enke | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Summary | 0000340: Segfault while throwing an Exception | ||||
Description | With the Debian 5.2.0-etch8 stable package and Xdebug we're getting segfaults when throwing an exception with code like this:
But I'm not able to provide a short reproduce-script. Maybe the backtrace helps. | ||||
Additional Information | GDB Backtrace: 0xb6e43132 in xdebug_var_export_fancy (struc=0xbff64124, str=0xbff64104, | ||||
Tags | No tags attached. | ||||
Operating System | Debian Etch | ||||
PHP Version | 5.2.0 | ||||
|
I can confirm that for Debian PHP 5.2.0-8+etch7 |
|
I can also confirm that this is occurring also for: Debian 5.2.0-8+etch11 |
|
It seems xdebug segfault when exception::$message isn't a string anymore. <?php class my_exception extends exception throw new my_exception ; ?> Test with php5-xdebug 2.0.3-1 debian package for testing. |
|
Just add following list in xdebug.c[2324] :
So the segfault disappear, but I face an other issue : Call Stack: my_exception: Object in /home/mickael/tmp/xdebug/exception_fail.php on line 12 Call Stack: I dig deepper. |
|
I patched the issue in PHP, so it'll segfault nor. Now, convertto* cannot be user in an exception context. zend_std_cast_object_tostring from PHP Zend/zend_object_handlers.c beleive we're throwing an exception in exception::__tostring. So we're not. I dig... :) |
|
Confirmed in 2.0.3 with PHP 5.2.6. Segfaults even if message class has __asString(). <?php class TestClass { class MyException extends Exception { throw new MyException(); ?> |
|
(kolen) Did you try with my patch ? The segfault occurred even ? |
|
Fixed in CVS. It will now throw a fatal error if you have the wrong types for those three properties. PHP itself has issues with it as well. |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-11-23 19:06 | s0enke | New Issue | |
2008-01-18 18:26 | rwilczek | Note Added: 0000825 | |
2008-08-08 11:14 | danielocallaghan | Note Added: 0000868 | |
2008-08-13 15:53 | LupusMichaelis | Note Added: 0000869 | |
2008-08-14 12:35 | LupusMichaelis | Note Added: 0000871 | |
2008-08-14 21:30 | LupusMichaelis | Note Added: 0000872 | |
2009-06-03 20:13 | kolen | Note Added: 0000963 | |
2009-06-16 12:37 | LupusMichaelis | Note Added: 0000966 | |
2009-07-09 17:53 | derick | Note Added: 0000986 | |
2009-07-09 17:53 | derick | Status | new => closed |
2009-07-09 17:53 | derick | Resolution | open => fixed |
2016-07-31 12:35 | derick | Category | Debug client (console) => debugclient (debugging tool) |
2016-07-31 12:35 | derick | Category | debugclient (debugging tool) => (No Category) |