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 @@ -791,7 +791,7 @@ ZEND_EXT_API void zend_jit_status(zval *ret)
791
791
add_assoc_long (& stats , "kind" , JIT_G (trigger ));
792
792
add_assoc_long (& stats , "opt_level" , JIT_G (opt_level ));
793
793
add_assoc_long (& stats , "opt_flags" , JIT_G (opt_flags ));
794
- if (dasm_buf && dasm_end && dasm_ptr ) {
794
+ if (dasm_buf ) {
795
795
add_assoc_long (& stats , "buffer_size" , (char * )dasm_end - (char * )dasm_buf );
796
796
add_assoc_long (& stats , "buffer_free" , (char * )dasm_end - (char * )* dasm_ptr );
797
797
} else {
@@ -5088,7 +5088,9 @@ ZEND_EXT_API void zend_jit_shutdown(void)
5088
5088
zend_jit_trace_free_caches (& jit_globals );
5089
5089
#endif
5090
5090
5091
- // Reset global pointers to prevent use-after-free in Apache reload
5091
+ /* Reset global pointers to prevent use-after-free in `zend_jit_status()`
5092
+ * after gracefully restarting Apache with mod_php, see:
5093
+ * https://github.com/php/php-src/pull/19212 */
5092
5094
dasm_ptr = NULL ;
5093
5095
dasm_buf = NULL ;
5094
5096
dasm_end = NULL ;
You can’t perform that action at this time.
0 commit comments