File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ PHP NEWS
14
14
. Fixed bug GH-7757 (Multi-inherited final constant causes fatal error).
15
15
(cmb)
16
16
. Fixed zend_fibers.c build with ZEND_FIBER_UCONTEXT. (Petr Sumbera)
17
+ . Fixed zend_observer_fcall_end_all() accessing dangling pointers. (Florian
18
+ Sowade)
17
19
18
20
- Filter:
19
21
. Fixed FILTER_FLAG_NO_RES_RANGE flag. (Yifan Tong)
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ ZEND_API void ZEND_FASTCALL zend_observer_fcall_end(
236
236
zend_execute_data * ex = execute_data -> prev_execute_data ;
237
237
while (ex && (!ex -> func || ex -> func -> type == ZEND_INTERNAL_FUNCTION
238
238
|| !ZEND_OBSERVABLE_FN (ex -> func -> common .fn_flags )
239
+ || !& RUN_TIME_CACHE (& ex -> func -> op_array )
239
240
|| !ZEND_OBSERVER_DATA (& ex -> func -> op_array )
240
241
|| ZEND_OBSERVER_DATA (& ex -> func -> op_array ) == ZEND_OBSERVER_NOT_OBSERVED )) {
241
242
ex = ex -> prev_execute_data ;
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #81430 (Attribute instantiation frame has no run time cache)
3
+ --INI--
4
+ memory_limit=20M
5
+ zend_test.observer.enabled=1
6
+ zend_test.observer.observe_all=1
7
+ --FILE--
8
+ <?php
9
+
10
+ #[\Attribute]
11
+ class A {
12
+ public function __construct () {}
13
+ }
14
+
15
+ #[A]
16
+ function B () {}
17
+
18
+ $ r = new \ReflectionFunction ("B " );
19
+ call_user_func ([$ r ->getAttributes (A::class)[0 ], 'newInstance ' ]);
20
+ ?>
21
+ --EXPECTF--
22
+ <!-- init '%s' -->
23
+ <file '%s'>
24
+ <!-- init A::__construct() -->
25
+ <A::__construct>
26
+ </A::__construct>
27
+ </file '%s'>
You can’t perform that action at this time.
0 commit comments