1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Prevent starting JIT on AArch64 with buffuer aize above 128M

B and BL instructions are limited by 128M offset
This commit is contained in:
Dmitry Stogov
2023-10-31 21:42:25 +03:00
parent 93d5c0e946
commit 2782577c4f

View File

@@ -3369,6 +3369,15 @@ ZEND_EXT_API int zend_jit_check_support(void)
}
}
#if defined(IR_TARGET_AARCH64)
if (JIT_G(buffer_size) > 128*1024*1024) {
zend_error(E_WARNING, "JIT on AArch64 doesn't support opcache.jit_buffer_size above 128M.");
JIT_G(enabled) = 0;
JIT_G(on) = 0;
return FAILURE;
}
#endif
return SUCCESS;
}