mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Merge branch 'PHP-8.1'
* PHP-8.1: Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This commit is contained in:
commit
1d4482908b
@ -238,7 +238,6 @@ ZEND_API void ZEND_FASTCALL zend_observer_fcall_end(
|
||||
zend_execute_data *ex = execute_data->prev_execute_data;
|
||||
while (ex && (!ex->func || ex->func->type == ZEND_INTERNAL_FUNCTION
|
||||
|| !ZEND_OBSERVABLE_FN(ex->func->common.fn_flags)
|
||||
|| !&RUN_TIME_CACHE(&ex->func->op_array)
|
||||
|| !ZEND_OBSERVER_DATA(&ex->func->op_array)
|
||||
|| ZEND_OBSERVER_DATA(&ex->func->op_array) == ZEND_OBSERVER_NOT_OBSERVED)) {
|
||||
ex = ex->prev_execute_data;
|
||||
|
@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #81430 (Attribute instantiation frame has no run time cache)
|
||||
--INI--
|
||||
memory_limit=20M
|
||||
zend_test.observer.enabled=1
|
||||
zend_test.observer.observe_all=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
#[\Attribute]
|
||||
class A {
|
||||
public function __construct() {}
|
||||
}
|
||||
|
||||
#[A]
|
||||
function B() {}
|
||||
|
||||
$r = new \ReflectionFunction("B");
|
||||
call_user_func([$r->getAttributes(A::class)[0], 'newInstance']);
|
||||
?>
|
||||
--EXPECTF--
|
||||
<!-- init '%s' -->
|
||||
<file '%s'>
|
||||
<!-- init A::__construct() -->
|
||||
<A::__construct>
|
||||
</A::__construct>
|
||||
</file '%s'>
|
Loading…
Reference in New Issue
Block a user