Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This commit is contained in:
Christoph M. Becker 2021-12-27 21:09:53 +01:00
commit d58c48d45d
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
3 changed files with 0 additions and 30 deletions

2
NEWS
View file

@ -14,8 +14,6 @@ PHP NEWS
. Fixed bug GH-7757 (Multi-inherited final constant causes fatal error).
(cmb)
. Fixed zend_fibers.c build with ZEND_FIBER_UCONTEXT. (Petr Sumbera)
. Fixed zend_observer_fcall_end_all() accessing dangling pointers. (Florian
Sowade)
- Filter:
. Fixed FILTER_FLAG_NO_RES_RANGE flag. (Yifan Tong)

View file

@ -236,7 +236,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'>