Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand bytecode offset variables to 32bit #6999

Merged
merged 1 commit into from
May 24, 2023

Conversation

klangman
Copy link
Contributor

A user experienced a compile time crash in setHandlerInfoWithOutBCInfo() because a bytecode index to a catch handler is above the 2^16th limit that normally applies for Java methods. This limit can be exceeded in rare cases after the JVM expands the method size on load. A good example of this would be when the VM inlines a "jsr" bytecode. Because the handler index is larger then 2^16th the offset is truncated when it is placed into the 16bit integer that we were using to record the offset. This fix will expand the size of variables used to hold bytecode offsets to be 32bits.

@klangman
Copy link
Contributor Author

This is the OMR side change that supports OpenJ9 changes to address the reported issue described above. I tested both the combined changes and the OMR changes alone and both passed. It's possible that the OpenJ9 changes would also pass independent of the OMR changes, but I will wait for these changes to merge before submitting the OpenJ9 changes.

@klangman
Copy link
Contributor Author

klangman commented May 23, 2023

Oops. My testing did not have asserts enabled. I will fix that test failure.

A user experienced a compile time crash in setHandlerInfoWithOutBCInfo()
because a bytecode index to a catch handler is above the 2^16th limit
that normally applies for Java methods. This limit can be exceeded in
rare cases after the JVM expands the method size on load. A good example
of this would be when the VM inlines a "jsr" bytecode. Because the
handler index is larger then 2^16th the offset is truncated when it is
placed into the 16bit integer that we were using to record the offset.
This fix will expand the size of variables used to hold bytecode offsets
to be 32bits.

Signed-off-by: Kevin Langman <[email protected]>
@vijaysun-omr
Copy link
Contributor

jenkins build all

@vijaysun-omr
Copy link
Contributor

vijaysun-omr commented May 24, 2023

jenkins build riscv

1 similar comment
@vijaysun-omr
Copy link
Contributor

jenkins build riscv

@jdekonin
Copy link
Contributor

fyi your riscv failure above is not your code. I'm adding compile:riscv64:cross to 2 systems that will be capable of riscv cross compiles but this isn't working yet.

@vijaysun-omr
Copy link
Contributor

Merging this since all other checks have passed and the change itself looks like a valid one to me.

@vijaysun-omr vijaysun-omr merged commit 31f5d0c into eclipse:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants