#35437 [NEW]: Segfault or Invalid Opcode 137/1/4
| From: | me at dither dot spb dot ru | Date: | Mon, 28 Nov 2005 03:19:51 +0000 |
| Subject: | #35437 [NEW]: Segfault or Invalid Opcode 137/1/4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-89156@lists.php.net to get a copy of this message | ||
From: me at dither dot spb dot ru
Operating system: WinXPSP2, Fedora Core 3
PHP version: 5.1.0
PHP Bug Type: Reproducible crash
Bug description: Segfault or Invalid Opcode 137/1/4
Description:
------------
PHP 5.1 Final Release.
(built: Nov 23 2005 23:59:35)
Easy repoducible segfault or Invalid opcode 137/1/4 Fatal Error.
Reproduce code:
---------------
<?php
function err2exception($errno, $errstr)
{
throw new Exception("Error occuried: " . $errstr);
}
set_error_handler('err2exception');
class TestClass
{
function testMethod()
{
//$GLOBALS['t'] = 'test';
$GLOBALS['t'] = new stdClass;
}
}
TestClass::testMethod();
?>
Expected result:
----------------
PHP Should cause Strict level Notice "Non-static method
TestClass::testMethod() should not be called statically", and after what
error_handler err2exception() must be executed.
Finally, it must be an Uncaught exception 'Exception' with message 'Error
occuried: Non-static method TestClass::testMethod() should not be called
statically'.
Actual result:
--------------
Segfault.
Uncommenting line //$GLOBALS['t'] = 'test' causes Invalid opcode 137/1/4
Fatal Error.
Commenting both $GLOBALS lines completly fixes bug.
Marking method testMethod() as static (... static function testMethod()
...) fixes bug too, but no exception will be thrown.
--
Edit bug report at http://bugs.php.net/?id=35437&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35437&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35437&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35437&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35437&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35437&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35437&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35437&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35437&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35437&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35437&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35437&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35437&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35437&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35437&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35437&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35437&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35437&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35437&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35437&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35437&r=mysqlcfg