Skip to content

[Backport] [Oracle GraalVM] [GR-69777] Backport to 23.1: Fix hash collisions in CompilationResultBuilder.buildLabelOffsets().#240

Merged
zakkak merged 1 commit intograalvm:masterfrom
bulasevich:GR-69777
Feb 13, 2026
Merged

[Backport] [Oracle GraalVM] [GR-69777] Backport to 23.1: Fix hash collisions in CompilationResultBuilder.buildLabelOffsets().#240
zakkak merged 1 commit intograalvm:masterfrom
bulasevich:GR-69777

Conversation

@bulasevich
Copy link
Collaborator

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 25, 2025
Copy link
Collaborator

@JohnTortugo JohnTortugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

LIRInstruction#hashCode() was inadequate for use in (identity) hash maps, since it was based on #id() which for many instructions would be -1 or -2, causing excessive hash collisions.
Removing the hashCode() override so that the identity hash code is returned instead.

(cherry picked from commit 1e78f0400328f1c543efba8f71a496a7ce538b02)
Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @bulasevich

@zakkak zakkak added this to the 23.1.11 milestone Feb 13, 2026
@zakkak zakkak merged commit 661cd85 into graalvm:master Feb 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backport] [Oracle GraalVM] [GR-69777] Backport to 23.1: Fix hash collisions in CompilationResultBuilder.buildLabelOffsets().

4 participants