Repository navigation
[JVM] Resolve conditional clone receivers before runtime type lookup - #563
Open
CaelmBleidd wants to merge 1 commit into
Open
CaelmBleidd wants to merge 1 commit into
CaelmBleidd wants to merge 1 commit into
Conversation
This was referenced Oct 20, 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.
Cloning a receiver read from an object array at a symbolic index can produce a conditional heap reference. The clone approximation currently passes that entire ITE into getTypeStream and throws
Unexpected ref, affecting both array and ordinary object clones.Resolve each feasible receiver alternative with a guarded fork before querying its runtime type. The current model selects which alternative continues now; the other alternative remains scheduled at the same call. Check null before the type query, then run the existing copy and invocation completion once for that receiver.
Validation on JDK11: three normal Java source regressions reproduce the exact getTypeStream/approximateObjectClone failure on unchanged main. After the fix, all five focused tests pass (0 failures/skips): both symbolic-index aliases retain their results, array mutation leaves the original intact, object copies retain shallow payload aliases, and the null alternative throws NullPointerException. Existing array-clone and enum checks pass. Regressions collect ALL terminals and disable coverage stopping so aliases sharing the same instructions are both checked. Module detekt tasks complete; existing nonfatal JVM lint findings remain outside the changed lines. Full CI and the six original Java50 cases have not been rerun.