Merge branch 'PHP-8.1'

* PHP-8.1:
  Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This commit is contained in:
Christoph M. Becker 2021-12-27 21:11:24 +01:00
commit 1d4482908b
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
2 changed files with 0 additions and 28 deletions

View File

@ -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;

View File

@ -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'>