File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -820,7 +820,7 @@ ZEND_EXT_API void zend_jit_status(zval *ret)
820
820
add_assoc_long (& stats , "kind" , JIT_G (trigger ));
821
821
add_assoc_long (& stats , "opt_level" , JIT_G (opt_level ));
822
822
add_assoc_long (& stats , "opt_flags" , JIT_G (opt_flags ));
823
- if (dasm_buf && dasm_end && dasm_ptr ) {
823
+ if (dasm_buf ) {
824
824
add_assoc_long (& stats , "buffer_size" , (char * )dasm_end - (char * )dasm_buf );
825
825
add_assoc_long (& stats , "buffer_free" , (char * )dasm_end - (char * )* dasm_ptr );
826
826
} else {
@@ -5079,7 +5079,9 @@ ZEND_EXT_API void zend_jit_shutdown(void)
5079
5079
zend_jit_trace_free_caches (& jit_globals );
5080
5080
#endif
5081
5081
5082
- // Reset global pointers to prevent use-after-free in Apache reload
5082
+ /* Reset global pointers to prevent use-after-free in `zend_jit_status()`
5083
+ * after gracefully restarting Apache with mod_php, see:
5084
+ * https://github.com/php/php-src/pull/19212 */
5083
5085
dasm_ptr = NULL ;
5084
5086
dasm_buf = NULL ;
5085
5087
dasm_end = NULL ;
You can’t perform that action at this time.
0 commit comments