Undefined constant causes segmentation fault
| Bug #47572 | Undefined constant causes segmentation fault | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2009-03-05 15:27 UTC | Modified: | 2009-03-08 17:26 UTC |
|
||||||||||
| From: | pumuckel at metropolis dot de | Assigned: | ||||||||||||
| Status: | Closed | Package: | Reproducible crash | |||||||||||
| PHP Version: | 5.3CVS-2009-03-05 (snap) | OS: | Linux Gentoo | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2009-03-05 15:27 UTC] pumuckel at metropolis dot de
Description:
------------
Reproducable segmentation fault when creating class instance. Caused by use of an undefined constant.
Reproduce code:
---------------
<?php
class Foo {
public static $bar = array(
FOO => "bar"
);
}
$foo = new Foo();
?>
Expected result:
----------------
clean running script - no crash
Actual result:
--------------
Segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1231058752 (LWP 14743)]
0x0836e169 in zval_update_constant_ex ()
(gdb) where
#0 0x0836e169 in zval_update_constant_ex ()
#1 0x0836e94e in zval_update_constant ()
#2 0x08384ee3 in zend_hash_apply_with_argument ()
#3 0x0837efff in zend_update_class_constants ()
#4 0x0837f257 in _object_and_properties_init ()
#5 0x0837f35e in _object_init_ex ()
#6 0x083a8f9d in ?? ()
#7 0x089e6c18 in ?? ()
#8 0x089e8644 in ?? ()
#9 0xb6d0dff4 in ?? () from /lib/libc.so.6
#10 0xb69f88c0 in ?? ()
#11 0x08a18668 in ?? ()
#12 0xbfefa6f8 in ?? ()
#13 0x08a5c8b4 in ?? ()
#14 0x08a18854 in ?? ()
#15 0x08a187f0 in ?? ()
#16 0x08a1883c in ?? ()
#17 0xbfefa708 in ?? ()
#18 0x083995b6 in ?? ()
#19 0x089e8624 in ?? ()
#20 0x00000003 in ?? ()
#21 0x089e6c18 in ?? ()
#22 0x08a187f0 in ?? ()
#23 0x08a187f0 in ?? ()
#24 0x08a1883c in ?? ()
#25 0xbfefa748 in ?? ()
#26 0x0839a839 in execute ()
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-03-05 15:37 UTC] pajoye@php.net
[2009-03-05 16:24 UTC] felipe@php.net