Bug #71435 [NEW]: Reproducible crash using opcache.file_cache_only=1 and class constant
From: wegvonhier+phpbugs at gmail dot com
Operating system: Windows 10 x64
PHP version: master-Git-2016-01-23 (snap)
Package: opcache
Bug Type: Bug
Bug description:Reproducible crash using opcache.file_cache_only=1 and class constant
Description:
------------
PHP crashes reproducibly (using the script listed below) on the
**second** time the script is executed using the cli with the latest
snapshotbuild(php-master-ts-windows-vc14-x64-r1091cec.zip) from
windows.php.net using opcache.file_cache_only=1 (file cache path is set
and a corresponding file is generated).
Version Info:
<snip>\php7-m>php --version
PHP 7.1.0-dev (cli) (built: Jan 23 2016 12:23:18) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies
Test script:
---------------
<?php
class Foo {
const BAR = '13';
}
echo Foo::BAR;
Expected result:
----------------
13
Actual result:
--------------
Access violation reading location 0x74B60403019
> php_opcache.dll!zend_file_cache_unserialize_class_constant(_zval_struct
* zv=0x0000074b60403019, _zend_persistent_script *
script=0x0000014560403018, void * buf=0x0000014560403018) Zeile 1084 C
php_opcache.dll!zend_file_cache_unserialize_class_constant(_zval_struct
* zv, _zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018) Zeile 1091 C
php_opcache.dll!zend_file_cache_unserialize_class_constant(_zval_struct
* zv, _zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018) Zeile 1091 C
php_opcache.dll!zend_file_cache_unserialize_class_constant(_zval_struct
* zv, _zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018) Zeile 1091 C
php_opcache.dll!zend_file_cache_unserialize_hash(_zend_array * ht,
_zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018, void(*)(_zval_struct *, _zend_persistent_script
*, void *) func=0x00007ffdd8b5eb70, void(*)(_zval_struct *)
dtor=0x0000000000000000) Zeile 850 C
php_opcache.dll!zend_file_cache_unserialize_class(_zval_struct * zv,
_zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018) Zeile 1136 C
php_opcache.dll!zend_file_cache_unserialize_hash(_zend_array * ht,
_zend_persistent_script * script=0x0000014560403018, void *
buf=0x0000014560403018, void(*)(_zval_struct *, _zend_persistent_script
*, void *) func=0x00007ffdd8b5ece0, void(*)(_zval_struct *)
dtor=0x00007ffdc6034760) Zeile 850 C
php_opcache.dll!zend_file_cache_unserialize(_zend_persistent_script *
script=0x0000014560403018, void * buf=0x0000014560403018) Zeile 1241 C
php_opcache.dll!zend_file_cache_script_load(_zend_file_handle *
file_handle) Zeile 1398 C
php_opcache.dll!file_cache_compile_file(_zend_file_handle *
file_handle=0x00000035d2dff440, int type=8) Zeile 1565 C
php_opcache.dll!persistent_compile_file(_zend_file_handle *
file_handle=0x00000035d2dff440, int type=8) Zeile 1625 C
php7ts.dll!zend_execute_scripts(int type=8, _zval_struct *
retval=0x0000000000000000, int file_count=3, ...) Zeile 1422 C
php7ts.dll!php_execute_script(_zend_file_handle *
primary_file=0x00000035d2dff440) Zeile 2484 C
php.exe!do_cli(int argc=2, char * * argv=0x000001455ea9f6c0) Zeile
975 C
php.exe!main(int argc=2, char * * argv=0x000001455ea9f6c0) Zeile
1345 C
[Externer Code]
--
Edit bug report at https://bugs.php.net/bug.php?id=71435&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71435&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71435&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71435&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71435&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71435&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71435&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71435&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71435&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71435&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71435&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71435&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71435&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71435&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71435&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71435&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71435&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71435&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71435&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71435&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71435&r=mysqlcfg
Thread (3 messages)
- wegvonhier+phpbugs at gmail dot com