Bug #70918 [Opn->Csd]: Segfault using static outside of class scope
| From: | laruence@php.net | Date: | Sun, 15 Nov 2015 02:42:43 +0000 |
| Subject: | Bug #70918 [Opn->Csd]: Segfault using static outside of class scope | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197260@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70918&edit=1
ID: 70918
Updated by: laruence@php.net
Reported by: leigh@php.net
Summary: Segfault using static outside of class scope
-Status: Open
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: master-Git-2015-11-15 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=06fe956460f93041abdaf4a12ccde43d317fa20c
Log: Fixed Bug #70918 (Segfault using static outside of class scope)
Previous Comments:
------------------------------------------------------------------------
[2015-11-15 02:06:24] leigh@php.net
Description:
------------
Using static outside of a class scope causes a segfault in git master. 7.0 is _not_ affected.
https://3v4l.org/nOblY
Test script:
---------------
<?php
static::x;
Expected result:
----------------
Fatal error: Cannot access static:: when no class scope is active in ....
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x0000000000d99464 in zend_hash_find_bucket (ht=0xb0, ht@entry=0x7ffff6855430, ht=0xb0,
ht@entry=0x7ffff6855430, key=0x7ffff6855380) at /home/leigh/php-src/Zend/zend_hash.c:437
437 nIndex = h | ht->nTableMask;
(gdb) bt
#0 0x0000000000d99464 in zend_hash_find_bucket (ht=0xb0, ht@entry=0x7ffff6855430, ht=0xb0,
ht@entry=0x7ffff6855430, key=0x7ffff6855380) at /home/leigh/php-src/Zend/zend_hash.c:437
#1 zend_hash_find (ht=ht@entry=0xb0, key=0x7ffff6855380) at
/home/leigh/php-src/Zend/zend_hash.c:1890
#2 0x0000000000edddf8 in ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_HANDLER () at
/home/leigh/php-src/Zend/zend_vm_execute.h:23918
#3 0x0000000000ec3ff3 in execute_ex (ex=<optimized out>) at
/home/leigh/php-src/Zend/zend_vm_execute.h:414
#4 0x00000000010b8d7b in zend_execute (op_array=op_array@entry=0x7ffff687e000,
return_value=return_value@entry=0x0) at /home/leigh/php-src/Zend/zend_vm_execute.h:458
#5 0x0000000000cc5abc in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0,
file_count=-159305680, file_count@entry=3) at /home/leigh/php-src/Zend/zend.c:1428
#6 0x0000000000a85968 in php_execute_script (primary_file=0x7fffffffd2d0) at
/home/leigh/php-src/main/main.c:2471
#7 0x00000000010c0911 in do_cli (argc=176, argv=0x7ffff6855380) at
/home/leigh/php-src/sapi/cli/php_cli.c:974
#8 0x000000000042ff61 in main (argc=176, argv=0x7ffff6855380) at
/home/leigh/php-src/sapi/cli/php_cli.c:1345
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70918&edit=1