Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5040,7 +5040,7 @@ ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached)

ZEND_EXT_API void zend_jit_shutdown(void)
{
if (JIT_G(debug) & ZEND_JIT_DEBUG_SIZE) {
if (JIT_G(debug) & ZEND_JIT_DEBUG_SIZE && dasm_ptr != NULL) {
fprintf(stderr, "\nJIT memory usage: %td\n", (ptrdiff_t)((char*)*dasm_ptr - (char*)dasm_buf));
}

Expand Down
13 changes: 13 additions & 0 deletions ext/opcache/tests/jit/gh13232.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
GH-13232 (Segmentation fault will be reported when JIT is off but JIT_debug is still on)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=disable
opcache.jit_debug=0xfffff
--FILE--
<?php
echo "Done\n";
?>
--EXPECT--
Done