Repository navigation
Conversation
…erand zend_jit_trace_update_condition_ranges() tested OP1_INFO() twice instead of OP1_INFO() and OP2_INFO(), so comparing an integer with a float or numeric-string literal narrowed the integer's range as if both operands were integers. zend_may_overflow() then ruled out overflow of a following $x + 1, the overflow check was omitted, and the trace returned a wrapped integer instead of a float, or failed an assertion while compiling. Require both operands to be integers, as the rest of the function assumes.
iliaal
force-pushed
the
fix/jit-cmp-range-op2
branch
from
October 22, 2026 10:20
578d7e8 to
5162097
Compare
iliaal
requested review from
arnaud-lb and
ndossche
and removed request for
dstogov
October 22, 2026 10:25
jorgsowa
approved these changes
Oct 22, 2026
jorgsowa
left a comment
Contributor
There was a problem hiding this comment.
Fix looks good to me, fixes simple typo. However there is still bug for non-literal cases. May be tackled in follow-up
Member
Author
|
Yeah, this is just the minimal fix. |
LamentXU123
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zend_jit_trace_update_condition_ranges()checked the first operand twice, allowing comparisons with float or numeric-string literals to narrow an integer's range and remove overflow checks. It now requires both operands to be integers, preserving float results on overflow. Found while testing #24110; verified with PHP-8.4 debug NTS under tracing JIT, function JIT, and with JIT disabled.