From: m dot stach at ewerk dot com Operating system: Windows/MacOSX PHP version: 5.2.3 PHP Bug Type: Reproducible crash Bug description: Crash instantiating classes with self-referencing constants
Description: ------------ When instantiating classes with self-referencing constants PHP crashes. It is reproducable on Windows (5.2.3), Mac (5.2.2) and Linux (5.2.0). Reproduce code: --------------- class b { const FOO = self::FOO; } new b(); echo "1"; Expected result: ---------------- 1 Actual result: -------------- No output, segmentation fault instead. Since I don't have MSVC available for backtrace, I tried on a mac and linux box, same result (but Versions were 5.2.2 and 5.2.0). Looks like an endless recursion. Crash-Report: Date/Time: 2007-06-08 14:55:00.261 +0200 OS Version: 10.4.9 (Build 8P135) Report Version: 4 Command: php Path: /usr/local/bin/php Parent: bash [7590] Version: ??? (???) PID: 7604 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbf7ffff0 Thread 0 Crashed: 0 php 0x004ae698 _zend_mm_alloc_int + 12 1 php 0x004afd48 _emalloc + 100 2 php 0x004b0410 _estrndup + 44 3 php 0x004c158c zend_get_constant_ex + 256 4 php 0x004c3470 zval_update_constant_ex + 340 5 php 0x004c3ca8 zval_update_constant + 44 6 php 0x004c171c zend_get_constant_ex + 656 lines 4-6 repeated 506 php 0x004c3ca8 zval_update_constant + 44 507 php 0x004c171c zend_get_constant_ex + 656 508 php 0x004c3470 zval_update_constant_ex + 340 -- Edit bug report at http://bugs.php.net/?id=41633&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41633&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41633&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41633&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41633&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41633&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41633&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41633&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41633&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41633&r=support Expected behavior: http://bugs.php.net/fix.php?id=41633&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41633&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41633&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41633&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41633&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41633&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41633&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41633&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41633&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41633&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41633&r=mysqlcfg