mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
d3684ff424
This will cause it to be skipped in --preload mode.
48 lines
860 B
PHP
48 lines
860 B
PHP
--TEST--
|
|
Bug #81435 (Observer current_observed_frame may point to an old (overwritten) frame)
|
|
--EXTENSIONS--
|
|
zend_test
|
|
--INI--
|
|
memory_limit=20M
|
|
zend_test.observer.enabled=1
|
|
zend_test.observer.observe_function_names=a,d
|
|
opcache.optimization_level=0
|
|
--FILE--
|
|
<?php
|
|
|
|
function d() {} // observed
|
|
|
|
function c() {
|
|
d();
|
|
}
|
|
|
|
function b() {
|
|
c();
|
|
}
|
|
|
|
function bailout(...$args) {
|
|
array_map("str_repeat", ["\xFF"], [100000000]);
|
|
}
|
|
|
|
function a() { // observed (first_observed_frame)
|
|
b();
|
|
bailout(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); // overwrite the vm_stack containing prev_execute_data
|
|
}
|
|
|
|
a();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
<!-- init '%s' -->
|
|
<!-- init a() -->
|
|
<a>
|
|
<!-- init b() -->
|
|
<!-- init c() -->
|
|
<!-- init d() -->
|
|
<d>
|
|
</d>
|
|
<!-- init bailout() -->
|
|
|
|
Fatal error: Allowed memory size of 20971520 bytes exhausted %s in %s on line %d
|
|
</a>
|