File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1619,7 +1619,8 @@ ZEND_API zend_function *zend_get_call_trampoline_func(const zend_class_entry *ce
16191619 | ZEND_ACC_VARIADIC
16201620 | (fbc -> common .fn_flags & (ZEND_ACC_RETURN_REFERENCE |ZEND_ACC_DEPRECATED ));
16211621 if (fbc -> common .attributes ) {
1622- func -> attributes = zend_array_dup (fbc -> common .attributes );
1622+ func -> attributes = fbc -> common .attributes ;
1623+ GC_TRY_ADDREF (func -> attributes );
16231624 } else {
16241625 func -> attributes = NULL ;
16251626 }
Original file line number Diff line number Diff line change @@ -339,11 +339,12 @@ ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_p
339339} while (0)
340340
341341#define zend_free_trampoline (func ) do { \
342- if (( func)->common.attributes) { \
343- zend_array_destroy((func)->common. attributes); \
344- (func)->common. attributes = NULL ; \
342+ HashTable *attributes = ( func)->common.attributes; \
343+ if (attributes && !(GC_FLAGS(attributes) & GC_IMMUTABLE) && !GC_DELREF( attributes)) { \
344+ zend_array_destroy( attributes) ; \
345345 } \
346346 if ((func) == &EG(trampoline)) { \
347+ EG(trampoline).common.attributes = NULL; \
347348 EG(trampoline).common.function_name = NULL; \
348349 } else { \
349350 efree(func); \
You can’t perform that action at this time.
0 commit comments