Skip to content

Commit 171049b

Browse files
committed
Prevent invalid run_time_cache allocation for "bad" internal functions
1 parent b0c8bf3 commit 171049b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static zend_never_inline zend_op_array* ZEND_FASTCALL zend_jit_init_func_run_tim
4242
{
4343
void **run_time_cache;
4444

45-
if (!RUN_TIME_CACHE(op_array)) {
45+
if (op_array->type == ZEND_USER_FUNCTION && !RUN_TIME_CACHE(op_array)) {
4646
run_time_cache = zend_arena_alloc(&CG(arena), op_array->cache_size);
4747
memset(run_time_cache, 0, op_array->cache_size);
4848
ZEND_MAP_PTR_SET(op_array->run_time_cache, run_time_cache);

0 commit comments

Comments
 (0)