ID: 50005
Updated by: [email protected]
Reported By: arturas dot moskvinas at gmail dot com
-Status: Open
+Status: Verified
Bug Type: Reproducible crash
Operating System: Centos 5.3 Final 64bit
PHP Version: 5.3.0
New Comment:
(dbx) where
current thread: t...@1
[1] strlen(0x0, 0x0, 0x44, 0xfefefefefefefeff, 0x0, 0x4000), at
0xfffffd7fff18d520
[2] strdup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1ccf78
[3] php_error_cb(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x894252
=>[4] zend_error_va(type = 1, file = (nil), lineno = 2U, format =
0xcf5f12 "Uncaught %s\n thrown", ...), line 749 in "zend_exceptions.c"
[5] zend_exception_error(exception = 0xd6a890, severity = 1), line
789 in "zend_exceptions.c"
[6] zend_execute_scripts(type = 8, retval = (nil), file_count = 3,
...), line 1212 in "zend.c"
[7] php_execute_script(primary_file = 0xfffffd7fffdff780), line 2226
in "main.c"
[8] main(argc = 1, argv = 0xfffffd7fffdff858), line 1190 in
"php_cli.c"
Previous Comments:
------------------------------------------------------------------------
[2009-10-26 21:23:39] arturas dot moskvinas at gmail dot com
Description:
------------
Throwing through Reflection modified Exception (or any other Exception
type) object makes php segment fault when file property is set to null.
Reproduce code:
---------------
<?php
$e = new Exception();
$reflection = new ReflectionObject($e);
$property = $reflection->getProperty("file");
$property->setAccessible(true);
$property->setValue($e, null);
throw $e;
?>
Expected result:
----------------
PHP Fatal error: Uncaught exception 'Exception' in null:xx
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50005&edit=1