From: tress at b0g dot org
Operating system: FreeBSD 4.9-STABLE
PHP version: 5.0.0b3 (beta3)
PHP Bug Type: Reproducible crash
Bug description: Uncaught exception causes segfault when extending the Exception
class.
Description:
------------
Uncaught exception causes segfault when extending the Exception class and
$msg is an integer.
Reproduce code:
---------------
<?php
class test
{
function __construct()
{
throw new err(1);
}
}
class err extends Exception
{
function __construct($msg)
{
//parent::Exception(); // Fatal error: Call to undefined method
exception::exception() in test.php
$this->message=$msg;
}
}
$t=new test;
?>
Expected result:
----------------
Fatal error: Uncaught exception 'err' with message '1' in test.php:8 Stack
trace: #0 test.php(): test->__construct() #1 {main} thrown in test.php
Actual result:
--------------
#0 0x28333164 in zif_reflection_extension_getName (ht=135174572,
return_value=0x0,
this_ptr=0xbfbffa30, return_value_used=134639035)
at /usr/local/php5/Zend/zend_reflection_api.c:2861
#1 0x8066deb in ap_clear_pool ()
#2 0x8066e6b in ap_destroy_pool ()
#3 0x8066dd7 in ap_clear_pool ()
#4 0x8066e6b in ap_destroy_pool ()
#5 0x8075c00 in clean_parent_exit ()
#6 0x807898f in standalone_main ()
#7 0x8078ee0 in main ()
#8 0x804ef62 in _start ()
--
Edit bug report at http://bugs.php.net/?id=27186&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27186&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27186&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27186&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27186&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27186&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27186&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27186&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27186&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27186&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27186&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27186&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27186&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27186&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27186&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27186&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27186&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27186&r=float