File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ typedef struct _zend_string zend_string;
70
70
} while (0)
71
71
# define ZEND_MAP_PTR_BIASED_BASE (real_base ) \
72
72
((void*)(((uintptr_t)(real_base)) + zend_map_ptr_static_size * sizeof(void *) - 1))
73
+ // Note: chunked like: [8192..12287][4096..8191][0..4095]
74
+ #define ZEND_MAP_PTR_STATIC_NUM_TO_PTR (num ) \
75
+ ((void **)CG(map_ptr_real_base) + zend_map_ptr_static_size - ZEND_MM_ALIGNED_SIZE_EX((num) + 1, 4096) + ((num) & 4095))
73
76
#else
74
77
# error "Unknown ZEND_MAP_PTR_KIND"
75
78
#endif
Original file line number Diff line number Diff line change @@ -4389,9 +4389,7 @@ static void preload_load(size_t orig_map_ptr_static_last)
4389
4389
ZCG (preloaded_internal_run_time_cache ) = cache ;
4390
4390
4391
4391
for (size_t cur_static_map_ptr = orig_map_ptr_static_last ; cur_static_map_ptr < zend_map_ptr_static_last ; ++ cur_static_map_ptr ) {
4392
- // Note: chunked like: [8192..12287][4096..8191][0..4095]
4393
- void * * ptr = (void * * ) CG (map_ptr_real_base ) + zend_map_ptr_static_size - ZEND_MM_ALIGNED_SIZE_EX (cur_static_map_ptr + 1 , 4096 ) + (cur_static_map_ptr & 4095 );
4394
- * ptr = cache ;
4392
+ * ZEND_MAP_PTR_STATIC_NUM_TO_PTR (cur_static_map_ptr ) = cache ;
4395
4393
cache += runtime_cache_size ;
4396
4394
}
4397
4395
}
You can’t perform that action at this time.
0 commit comments