mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
c3acfb1b57
In the test cases, the compiler bails out due to a fatal error. The data structures used by the compiler will contain stale values. In particular, for the test case CG(loop_var_stack) will contain data. The next compilation will incorrectly use elements from the previous stack. To solve this, we reset part of the compiler data structures. We don't do a full re-initialization via init_compiler() because that will also reset streams and resources. Closes GH-13938.
24 lines
365 B
PHP
24 lines
365 B
PHP
--TEST--
|
|
GH-13931 (Applying zero offset to null pointer in Zend/zend_opcode.c)
|
|
--FILE--
|
|
<?php
|
|
|
|
register_shutdown_function(function() {
|
|
var_dump(eval("return 1+3;"));
|
|
});
|
|
|
|
eval(<<<EVAL
|
|
function foo () {
|
|
try {
|
|
break;
|
|
} finally {
|
|
}
|
|
}
|
|
foo();
|
|
EVAL);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: 'break' not in the 'loop' or 'switch' context in %s on line %d
|
|
int(4)
|