Skip to content

Commit 2782577

Browse files
committed
Prevent starting JIT on AArch64 with buffuer aize above 128M
B and BL instructions are limited by 128M offset
1 parent 93d5c0e commit 2782577

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,6 +3369,15 @@ ZEND_EXT_API int zend_jit_check_support(void)
33693369
}
33703370
}
33713371

3372+
#if defined(IR_TARGET_AARCH64)
3373+
if (JIT_G(buffer_size) > 128*1024*1024) {
3374+
zend_error(E_WARNING, "JIT on AArch64 doesn't support opcache.jit_buffer_size above 128M.");
3375+
JIT_G(enabled) = 0;
3376+
JIT_G(on) = 0;
3377+
return FAILURE;
3378+
}
3379+
#endif
3380+
33723381
return SUCCESS;
33733382
}
33743383

0 commit comments

Comments
 (0)