Fix AOT int-to-string collision with live resource handles (#23811) - #23826
Merged
PurHur merged 1 commit intoJul 27, 2026
Merged
Conversation
…23811). Boxed __value__ longs skip the handle-registry probe; native-long coercion threads operand provenance from concat/echo so arithmetic locals format as integers, not Resource id #N. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 27, 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.
Summary
__value__→strval::valueToString(), which calledformatNativeLong()and probed the resource handle registry by numeric value. Integer2collided with live handle#2and rendered asResource id #2.TYPE_NATIVE_LONGvalues useformatBoxedNativeLong()(plain%lld— resources in boxes areTYPE_OBJECT). Unboxed native-long coercion threads CFG operand provenance viacannotBeResourceForString()for concat/echo.g07a_int_string_resource_collision.php(VM + AOT). Fullg07_incdec_resource_provenance.phpkeeps@differential-skip-aotfor the separate decrement-below-zero crash still open on this issue.Verification
Not covered this PR:
$n = 0; $n--; $n--;still prints0under AOT (decrement + post-echo truncation in full g07 repro).Closes #23811 (string rendering); decrement portion remains for follow-up on the issue.
Made with Cursor