Skip to content

Commit c939b91

Browse files
clarify comment
1 parent a4f1c89 commit c939b91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ ZEND_EXT_API void zend_jit_status(zval *ret)
791791
add_assoc_long(&stats, "kind", JIT_G(trigger));
792792
add_assoc_long(&stats, "opt_level", JIT_G(opt_level));
793793
add_assoc_long(&stats, "opt_flags", JIT_G(opt_flags));
794-
if (dasm_buf && dasm_end && dasm_ptr) {
794+
if (dasm_buf) {
795795
add_assoc_long(&stats, "buffer_size", (char*)dasm_end - (char*)dasm_buf);
796796
add_assoc_long(&stats, "buffer_free", (char*)dasm_end - (char*)*dasm_ptr);
797797
} else {
@@ -5088,7 +5088,9 @@ ZEND_EXT_API void zend_jit_shutdown(void)
50885088
zend_jit_trace_free_caches(&jit_globals);
50895089
#endif
50905090

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 */
50925094
dasm_ptr = NULL;
50935095
dasm_buf = NULL;
50945096
dasm_end = NULL;

0 commit comments

Comments
 (0)