You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: SIGFPE on $x % -1 with a constant -1 divisor when $x is PHP_INT_MIN (opcache.jit=function) #24390
Expected int(0): that is what the interpreter prints, and mod_function in Zend/zend_operators.c special-cases a divisor of -1.
Reproduces on master at 5ccc56b with both an ASan build and a release build.
Looks like the constant-divisor branch for ZEND_MOD in zend_jit_long_math_helper (ext/opcache/jit/zend_jit_ir.c) emits a plain idiv by -1, which traps when the dividend is ZEND_LONG_MIN; the non-constant branch has a guard for this case.
The trigger came from a generated test, not from a real program. I can send a patch if that helps.
Found with an LLM-based testing tool; I used Claude to reduce it and look for the cause.
Activity
ndossche commentedon Oct 17, 2026
Feel free to do so
ndossche commentedon Oct 18, 2026
Fixed via GH-24394