mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #78429: opcache_compile_file(__FILE__); segfaults
This commit is contained in:
commit
9b9fac78b0
2 changed files with 18 additions and 0 deletions
13
ext/opcache/tests/bug78429.phpt
Normal file
13
ext/opcache/tests/bug78429.phpt
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #78429 (opcache_compile_file(__FILE__); segfaults)
|
||||||
|
--SKIPIF--
|
||||||
|
<?php require_once('skipif.inc'); ?>
|
||||||
|
--INI--
|
||||||
|
opcache.enable_cli=0
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(opcache_compile_file(__FILE__));
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Notice: Zend OPcache has not been properly started, can't compile file in %s on line %d
|
||||||
|
bool(false)
|
|
@ -867,6 +867,11 @@ static ZEND_FUNCTION(opcache_compile_file)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!accel_startup_ok) {
|
||||||
|
zend_error(E_NOTICE, ACCELERATOR_PRODUCT_NAME " has not been properly started, can't compile file");
|
||||||
|
RETURN_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
zend_stream_init_filename(&handle, script_name);
|
zend_stream_init_filename(&handle, script_name);
|
||||||
|
|
||||||
orig_execute_data = EG(current_execute_data);
|
orig_execute_data = EG(current_execute_data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue