Skip to content

(0.51) Reorder is-present and should-be-adjacent checks in alloc path #21499

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

pshipton
Copy link
Member

During slow path allocation, when we initialize dataAddr field for adjacent data case, we now check if dataAddr is present first, before checking if data should be adjacent.

Previously, we would check adjacency first, which could read bogus value. Relatively benign, since we would still correctly skip initializing dataAddr, because it's not present.

But in abnormal cases with say class slot corruption, we could end up crashing prematurely in adjacency check even if dataAddr is not present (what would be confusing), rather then asserting later that class slot is corrupted.

Cherry pick #21493

During slow path allocation, when we initialize dataAddr field for
adjacent data case, we now check if dataAddr is present first, before
checking if data should be adjacent.

Previously, we would check adjacency first, which could read bogus
value. Relatively benign, since we would still correctly skip
initializing dataAddr, because it's not present.

But in abnormal cases with say class slot corruption, we could end up
crashing prematurely in adjacency check even if dataAddr is not present
(what would be confusing), rather then asserting later that class slot
is corrupted.

Signed-off-by: Aleksandar Micic <[email protected]>
@pshipton pshipton requested a review from dmitripivkine March 27, 2025 03:22
@dmitripivkine dmitripivkine merged commit e854ad7 into eclipse-openj9:v0.51.0-release Mar 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants