#28792 [NEW]: throwing an exception inside a __get() causes a segmentation fault
| From: | fabio at catho dot com dot br | Date: | Tue, 15 Jun 2004 14:13:26 +0000 |
| Subject: | #28792 [NEW]: throwing an exception inside a __get() causes a segmentation fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-60955@lists.php.net to get a copy of this message | ||
From: fabio at catho dot com dot br
Operating system: Linux 2.4.24
PHP version: 5.0.0RC3
PHP Bug Type: Reproducible crash
Bug description: throwing an exception inside a __get() causes a segmentation fault
Description:
------------
This code was working on PHP5 RC2, but not in the latest versions (CVS,
PHP5 RC3).
See http://bugs.php.net/bug.php?id=24279.
Reproduce code:
---------------
class test {
function __get($propname) {
throw new Exception("TEST");
}
}
$t = new test();
echo $t->ok;
Expected result:
----------------
Fatal error: Uncaught exception 'Exception' with message 'TEST' in
/usr/local/apache2/htdocs/Core/dump.php:4 Stack trace: #0
/usr/local/apache2/htdocs/Core/dump.php(8): test->__get() #1
/usr/local/apache2/htdocs/Core/dump.php(8): unknown() #2 {main} thrown in
/usr/local/apache2/htdocs/Core/dump.php on line 4
Actual result:
--------------
Segmentation Fault (zero size reply)
--
Edit bug report at http://bugs.php.net/?id=28792&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28792&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28792&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28792&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28792&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28792&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28792&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28792&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28792&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28792&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28792&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28792&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28792&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28792&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28792&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28792&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28792&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28792&r=float