Fix regression on systems built without JIT (#16024)

regressing commit: 654b787ee1

This was called if JIT was enabled or not. If not enabled, it'll result
in an undeclared function warning and maybe a bad time in the linker.
Gate the meat of this PHP-side function on if JIT is enabled (but keep
it existing so PHP userland code works with or without JIT, OFC).
This commit is contained in:
Calvin Buckley 2024-09-24 11:38:59 -03:00 committed by GitHub
parent 3293fafa27
commit f5f05e886e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -934,10 +934,12 @@ ZEND_FUNCTION(opcache_jit_blacklist)
RETURN_THROWS();
}
#ifdef HAVE_JIT
const zend_function *func = zend_get_closure_method_def(Z_OBJ_P(closure));
if (ZEND_USER_CODE(func->type)) {
zend_jit_blacklist_function((zend_op_array *)&func->op_array);
}
#endif
}
ZEND_FUNCTION(opcache_compile_file)