php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47860 PHP crash when creating an array-var with an undefined constant as index
Submitted: 2009-04-01 12:05 UTC Modified: 2009-04-01 12:10 UTC
From: phpbug at terencehersbach dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.3.0RC1 OS: Mac OSX 10.5.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbug at terencehersbach dot nl
New email:
PHP Version: OS:

 

 [2009-04-01 12:05 UTC] phpbug at terencehersbach dot nl
Description:
------------
PHP crashes when creating an array-var with an undefined constant as index

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');

function foo() {
    static $var = array(test => 'hi');

    echo 'bar';
}

foo();

Expected result:
----------------
Notice: Use of undefined constant test - assumed 'test' in test.php on line 6
bar

Actual result:
--------------
php crashes after a while and there is no result

Generated CrashReport:
Process:         httpd [12399]
Path:            /Applications/MAMP/Library/bin/httpd
Identifier:      httpd
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  httpd [12388]

Date/Time:       2009-04-01 14:01:53.876 +0200
OS Version:      Mac OS X 10.5.6 (9G55)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000001
Crashed Thread:  0

Application Specific Information:
*** single-threaded process forked ***

Thread 0 Crashed:
0   libphp5.so                    	0x01388f49 zval_update_constant_ex + 393
1   libphp5.so                    	0x01389800 zval_update_constant + 32
2   libphp5.so                    	0x013c15c3 zend_fetch_var_address_helper_SPEC_CONST + 467
3   libphp5.so                    	0x013bb4f5 execute + 485
4   libphp5.so                    	0x01397bf6 zend_execute_scripts + 102
5   libphp5.so                    	0x0133d308 php_execute_script + 392
6   libphp5.so                    	0x0144553b php_handler + 1675
7   httpd                         	0x0000b6d8 ap_run_handler + 59 (config.c:152)
8   httpd                         	0x0000badb ap_invoke_handler + 87 (config.c:366)
9   httpd                         	0x00008746 ap_process_request + 375 (http_request.c:249)
10  httpd                         	0x000029e0 ap_process_http_connection + 297 (http_core.c:253)
11  httpd                         	0x00016888 ap_run_process_connection + 59 (connection.c:43)
12  httpd                         	0x00016ba6 ap_process_connection + 69 (connection.c:178)
13  httpd                         	0x00009756 child_main + 1190 (prefork.c:611)
14  httpd                         	0x000099e7 make_child + 293 (prefork.c:704)
15  httpd                         	0x0000a53d ap_mpm_run + 2681 (prefork.c:829)
16  httpd                         	0x000110fa main + 1709 (main.c:623)
17  httpd                         	0x0000249e _start + 216
18  httpd                         	0x000023c5 start + 41

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0xfdeb0b61  ebx: 0x01388dd8  ecx: 0x00000001  edx: 0x00000001
  edi: 0x0214f4b4  esi: 0x0214f4a6  ebp: 0xbfffeef8  esp: 0xbfffee50
   ss: 0x0000001f  efl: 0x00000207  eip: 0x01388f49   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x00000001

Binary Images:
    0x1000 -    0x38ff3 +httpd ??? (???) /Applications/MAMP/Library/bin/httpd
   0xff000 -   0x10cfcf +libaprutil-0.0.dylib ??? (???) /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
  0x13f000 -   0x156fc8 +libexpat.0.dylib ??? (???) /Applications/MAMP/Library/lib/libexpat.0.dylib
  0x18a000 -   0x27bfc7 +libiconv.2.dylib ??? (???) /Applications/MAMP/Library/lib/libiconv.2.dylib
  0x2d3000 -   0x2e6fcb +libapr-0.0.dylib ??? (???) /Applications/MAMP/Library/lib/libapr-0.0.dylib
  0x343000 -   0x343fff +mod_access.so ??? (???) /Applications/MAMP/Library/modules/mod_access.so
  0x34b000 -   0x34bfff +mod_auth.so ??? (???) /Applications/MAMP/Library/modules/mod_auth.so
  0x353000 -   0x353fff +mod_auth_anon.so ??? (???) /Applications/MAMP/Library/modules/mod_auth_anon.so
  0x35a000 -   0x35afff +mod_auth_dbm.so ??? (???) /Applications/MAMP/Library/modules/mod_auth_dbm.so
  0x362000 -   0x366fcf +mod_auth_digest.so ??? (???) /Applications/MAMP/Library/modules/mod_auth_digest.so
  0x373000 -   0x373fff +mod_file_cache.so ??? (???) /Applications/MAMP/Library/modules/mod_file_cache.so
  0x37c000 -   0x37cfff +mod_echo.so ??? (???) /Applications/MAMP/Library/modules/mod_echo.so
  0x384000 -   0x386fff +mod_charset_lite.so ??? (???) /Applications/MAMP/Library/modules/mod_charset_lite.so
  0x390000 -   0x394033 +mod_cache.so ??? (???) /Applications/MAMP/Library/modules/mod_cache.so
  0x3a9000 -   0x3aafff +mod_disk_cache.so ??? (???) /Applications/MAMP/Library/modules/mod_disk_cache.so
  0x3b5000 -   0x3b7fff +mod_mem_cache.so ??? (???) /Applications/MAMP/Library/modules/mod_mem_cache.so
  0x3c7000 -   0x3c8fff +mod_example.so ??? (???) /Applications/MAMP/Library/modules/mod_example.so
  0x3d1000 -   0x3d1fff +mod_case_filter.so ??? (???) /Applications/MAMP/Library/modules/mod_case_filter.so
  0x3d9000 -   0x3d9fff +mod_case_filter_in.so ??? (???) /Applications/MAMP/Library/modules/mod_case_filter_in.so
  0x3e1000 -   0x3e3fff +mod_ext_filter.so ??? (???) /Applications/MAMP/Library/modules/mod_ext_filter.so
  0x3ee000 -   0x3f0043 +mod_deflate.so ??? (???) /Applications/MAMP/Library/modules/mod_deflate.so
  0x500000 -   0x507fff +mod_include.so ??? (???) /Applications/MAMP/Library/modules/mod_include.so
  0x51a000 -   0x51cfff +mod_log_config.so ??? (???) /Applications/MAMP/Library/modules/mod_log_config.so
  0x52a000 -   0x52afff +mod_env.so ??? (???) /Applications/MAMP/Library/modules/mod_env.so
  0x532000 -   0x535fff +mod_mime_magic.so ??? (???) /Applications/MAMP/Library/modules/mod_mime_magic.so
  0x543000 -   0x543fff +mod_cern_meta.so ??? (???) /Applications/MAMP/Library/modules/mod_cern_meta.so
  0x54b000 -   0x54cfff +mod_expires.so ??? (???) /Applications/MAMP/Library/modules/mod_expires.so
  0x555000 -   0x556fff +mod_headers.so ??? (???) /Applications/MAMP/Library/modules/mod_headers.so
  0x560000 -   0x561fff +mod_usertrack.so ??? (???) /Applications/MAMP/Library/modules/mod_usertrack.so
  0x56a000 -   0x56b04b +mod_unique_id.so ??? (???) /Applications/MAMP/Library/modules/mod_unique_id.so
  0x572000 -   0x573fff +mod_setenvif.so ??? (???) /Applications/MAMP/Library/modules/mod_setenvif.so
  0x57c000 -   0x581fff +mod_proxy.so ??? (???) /Applications/MAMP/Library/modules/mod_proxy.so
  0x596000 -   0x59701b +mod_proxy_connect.so ??? (???) /Applications/MAMP/Library/modules/mod_proxy_connect.so
  0x59f000 -   0x5a4fff +mod_proxy_ftp.so ??? (???) /Applications/MAMP/Library/modules/mod_proxy_ftp.so
  0x5b1000 -   0x5b5fff +mod_proxy_http.so ??? (???) /Applications/MAMP/Library/modules/mod_proxy_http.so
  0x5c2000 -   0x5c2fff +mod_bucketeer.so ??? (???) /Applications/MAMP/Library/modules/mod_bucketeer.so
  0x5ca000 -   0x5ccfff +mod_mime.so ??? (???) /Applications/MAMP/Library/modules/mod_mime.so
  0x5d7000 -   0x5e7ff7 +mod_dav.so ??? (???) /Applications/MAMP/Library/modules/mod_dav.so
  0x620000 -   0x623ffb +mod_status.so ??? (???) /Applications/MAMP/Library/modules/mod_status.so
  0x62c000 -   0x631fff +mod_autoindex.so ??? (???) /Applications/MAMP/Library/modules/mod_autoindex.so
  0x63f000 -   0x63ffff +mod_asis.so ??? (???) /Applications/MAMP/Library/modules/mod_asis.so
  0x646000 -   0x647fff +mod_info.so ??? (???) /Applications/MAMP/Library/modules/mod_info.so
  0x650000 -   0x652fff +mod_cgi.so ??? (???) /Applications/MAMP/Library/modules/mod_cgi.so
  0x65f000 -   0x663fff +mod_cgid.so ??? (???) /Applications/MAMP/Library/modules/mod_cgid.so
  0x672000 -   0x679ff3 +mod_dav_fs.so ??? (???) /Applications/MAMP/Library/modules/mod_dav_fs.so
  0x699000 -   0x69afff +mod_vhost_alias.so ??? (???) /Applications/MAMP/Library/modules/mod_vhost_alias.so
  0x6a2000 -   0x6a7fff +mod_negotiation.so ??? (???) /Applications/MAMP/Library/modules/mod_negotiation.so
  0x6b7000 -   0x6b7ffe +mod_dir.so ??? (???) /Applications/MAMP/Library/modules/mod_dir.so
  0x6bf000 -   0x6c1073 +mod_imap.so ??? (???) /Applications/MAMP/Library/modules/mod_imap.so
  0x6cb000 -   0x6cbfff +mod_actions.so ??? (???) /Applications/MAMP/Library/modules/mod_actions.so
  0x6d3000 -   0x6d4fff +mod_speling.so ??? (???) /Applications/MAMP/Library/modules/mod_speling.so
  0x6dc000 -   0x6dcfff +mod_userdir.so ??? (???) /Applications/MAMP/Library/modules/mod_userdir.so
  0x6e4000 -   0x6e5fff +mod_alias.so ??? (???) /Applications/MAMP/Library/modules/mod_alias.so
  0x6ee000 -   0x6f8fff +mod_rewrite.so ??? (???) /Applications/MAMP/Library/modules/mod_rewrite.so
  0x70c000 -   0x72afe3  libexpat.1.dylib ??? (???) <eff8a63a23a7d07af62b36fdb329e393> /usr/lib/libexpat.1.dylib
  0x732000 -   0x73efff +libexslt.0.dylib ??? (???) <e6c91c3d833602db0ecdfe05511f4ab5> /Applications/MAMP/Library/lib/libexslt.0.dylib
  0x747000 -   0x74bffc +libhistory.6.0.dylib ??? (???) <91a0df5ac7e4ca7bd969400f99a971c9> /usr/local/lib/libhistory.6.0.dylib
  0x751000 -   0x770ffc +libreadline.6.0.dylib ??? (???) <5ed6e212dcdd4f76881bc226b6b4dc78> /usr/local/lib/libreadline.6.0.dylib
  0x78f000 -   0x7b7fff +libmysqlclient.15.dylib ??? (???) <ea6f2237502b58816e557c462ec3fd49> /usr/local/lib/mysql/libmysqlclient.15.dylib
  0x7ec000 -   0x7f0fff +libltdl.3.dylib ??? (???) /Applications/MAMP/Library/lib/libltdl.3.dylib
 0x1000000 -  0x181ffe7 +libphp5.so ??? (???) <f77dc5af16f1a945a47c1be9e179b366> /Applications/MAMP/Library/modules/libphp5.so
 0x194d000 -  0x196efe3 +libmcrypt.4.dylib ??? (???) <f5d92ebf48bd3a22bb332c4f256ae95a> /Applications/MAMP/Library/lib/libmcrypt.4.dylib
 0x1989000 -  0x19bffff +libt1.5.dylib ??? (???) <ab5c6fb09794a30b278b357febff6541> /Applications/MAMP/Library/lib/libt1.5.dylib
 0x19ea000 -  0x1a4eff3 +libfreetype.6.dylib ??? (???) <9b3f6a44e0d951d2171e9cd1f8d006c0> /Applications/MAMP/Library/lib/libfreetype.6.dylib
 0x1a76000 -  0x1a95feb +libpng12.0.dylib ??? (???) <b00443d98f0d2a2fb04000412b9ef2fb> /Applications/MAMP/Library/lib/libpng12.0.dylib
 0x1aa3000 -  0x1abfff8 +libjpeg.62.dylib ??? (???) <6ef560ca230990078782447b149eecea> /Applications/MAMP/Library/lib/libjpeg.62.dylib
 0x1ac6000 -  0x1af6ff3 +libcurl.4.dylib ??? (???) /Applications/MAMP/Library/lib/libcurl.4.dylib
 0x1ceb000 -  0x1deefef +libxml2.2.dylib ??? (???) <67ed33bf4ef605f043080b115c051dd1> /Applications/MAMP/Library/lib/libxml2.2.dylib
 0x1e4f000 -  0x1e7bfff +libxslt.1.dylib ??? (???) <8297fea366393a8f26510427cc17a796> /Applications/MAMP/Library/lib/libxslt.1.dylib
 0x1e8c000 -  0x1f0fffb +libicuuc.dylib ??? (???) /Library/Frameworks/Firebird.framework/Versions/A/Libraries/libicuuc.dylib
 0x1f42000 -  0x2086fff +libicudata.dylib ??? (???) /Library/Frameworks/Firebird.framework/Versions/A/Libraries/libicudata.dylib
 0x2089000 -  0x20c8ff7 +libicui18n.dylib ??? (???) /Library/Frameworks/Firebird.framework/Versions/A/Libraries/libicui18n.dylib
 0x20d9000 -  0x2105fef +libidn.11.dylib ??? (???) /Applications/MAMP/Library/lib/libidn.11.dylib
 0x211a000 -  0x2121ff3 +libintl.8.dylib ??? (???) <c17f5d685957df993cee7b8b601d8c18> /Applications/MAMP/Library/lib/libintl.8.dylib
0x30000000 - 0x3030bfeb +com.firebirdsql.Firebird ??? (__VERSION__) /Library/Frameworks/Firebird.framework/Versions/A/Firebird
0x8fe00000 - 0x8fe2db43  dyld 97.1 (???) <100d362e03410f181a34e04e94189ae5> /usr/lib/dyld
0x90003000 - 0x90060ffb  libstdc++.6.dylib ??? (???) <04b812dcec670daa8b7d2852ab14be60> /usr/lib/libstdc++.6.dylib
0x908ba000 - 0x908c9fff  libsasl2.2.dylib ??? (???) <bb7971ca2f609c070f87786a93d1041e> /usr/lib/libsasl2.2.dylib
0x90d95000 - 0x90db9feb  libssl.0.9.7.dylib ??? (???) <c7359b7ab32b5f8574520746e10a41cc> /usr/lib/libssl.0.9.7.dylib
0x90dba000 - 0x90ef2ff7  libicucore.A.dylib ??? (???) <18098dcf431603fe47ee027a60006c85> /usr/lib/libicucore.A.dylib
0x93383000 - 0x933b5fff  com.apple.LDAPFramework 1.4.5 (110) <cc04500cf7b6edccc75bb3fe2973f72c> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
0x93413000 - 0x934c5ffb  libcrypto.0.9.7.dylib ??? (???) <69bc2457aa23f12fa7d052601d48fa29> /usr/lib/libcrypto.0.9.7.dylib
0x9396c000 - 0x9398afff  libresolv.9.dylib ??? (???) <a8018c42930596593ddf27f7c20fe7af> /usr/lib/libresolv.9.dylib
0x939a4000 - 0x939b2ffd  libz.1.dylib ??? (???) <5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib
0x93a7e000 - 0x93b2efff  edu.mit.Kerberos 6.0.12 (6.0.12) <685cc018c133668d0d3ac6a1cb63cff9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x94418000 - 0x9454bfff  com.apple.CoreFoundation 6.5.5 (476.17) <4a70c8dbb582118e31412c53dc1f407f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x9458c000 - 0x94593fe9  libgcc_s.1.dylib ??? (???) <f53c808e87d1184c0f9df63aef53ce0b> /usr/lib/libgcc_s.1.dylib
0x948a1000 - 0x948adfff  libbz2.1.0.dylib ??? (???) <cc1b7e3f5f4e2ff545157c368e09bc5e> /usr/lib/libbz2.1.0.dylib
0x9510f000 - 0x9513eff7  libncurses.5.4.dylib ??? (???) <3b2ac2ca8190942b6b81d2a7012ea859> /usr/lib/libncurses.5.4.dylib
0x9513f000 - 0x9530dff3  com.apple.security 5.0.4 (34102) <55dda7486df4e8e1d61505be16f83a1c> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x95455000 - 0x95459fff  libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib
0x95b7f000 - 0x95c5ffff  libobjc.A.dylib ??? (???) <7b92613fdf804fd9a0a3733a0674c30b> /usr/lib/libobjc.A.dylib
0x9612e000 - 0x96159fe7  libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib
0x9615a000 - 0x962c1ff3  libSystem.B.dylib ??? (???) <d68880dfb1f8becdbdac6928db1510fb> /usr/lib/libSystem.B.dylib
0xfffe8000 - 0xfffebfff  libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib
0xffff0000 - 0xffff1780  libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-01 12:10 UTC] phpbug at terencehersbach dot nl
fixed in alpha.. the bug is from the last beta.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Mar 31 11:01:25 2020 UTC