mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths (#14558)
This commit is contained in:
commit
e842ddfe4f
@ -8329,7 +8329,20 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
|
||||
if (!(ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & (ZEND_JIT_TRACE_JITED|ZEND_JIT_TRACE_BLACKLISTED))) {
|
||||
/* skip: not JIT-ed nor blacklisted */
|
||||
} else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) {
|
||||
/* skip: too many root traces */
|
||||
/* too many root traces, blacklist the root trace */
|
||||
if (!(ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags & ZEND_JIT_TRACE_BLACKLISTED)) {
|
||||
SHM_UNPROTECT();
|
||||
zend_jit_unprotect();
|
||||
|
||||
((zend_op*)opline)->handler =
|
||||
ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->orig_handler;
|
||||
|
||||
ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags &= ~ZEND_JIT_TRACE_JITED;
|
||||
ZEND_OP_TRACE_INFO(t->opline, jit_extension->offset)->trace_flags |= ZEND_JIT_TRACE_BLACKLISTED;
|
||||
|
||||
zend_jit_protect();
|
||||
SHM_PROTECT();
|
||||
}
|
||||
} else {
|
||||
SHM_UNPROTECT();
|
||||
zend_jit_unprotect();
|
||||
|
Loading…
Reference in New Issue
Block a user