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

Avoid segfaults in j9vmem_testOverlappingSegments #19517

Merged

Conversation

cjjdespres
Copy link
Contributor

Since the keepCycles array is zero-initialized, if the test is aborted in the very first cycle (i == 0) the cleanup procedure at the end cannot rely on the fact that keepCycles[j] >= i implies that segment j must be freed. Before these changes, such a scenario would cause the test to segfault during cleanup.

Fixes: #19509

Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

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

LGTM

Since the keepCycles array is zero-initialized, if the test is aborted
in the very first cycle (i == 0) the cleanup procedure at the end cannot
rely on the fact that keepCycles[j] >= i implies that segment j must
be freed. Before these changes, such a scenario would cause the test
to segfault during cleanup.

Signed-off-by: Christian Despres <[email protected]>
@cjjdespres cjjdespres force-pushed the fix-overlapping-segment-test branch from a464dc4 to 1a608bf Compare January 7, 2025 16:21
@mpirvu
Copy link
Contributor

mpirvu commented Jan 7, 2025

jenkins test sanity.functional all jdk21

@mpirvu mpirvu self-assigned this Jan 8, 2025
@mpirvu
Copy link
Contributor

mpirvu commented Jan 8, 2025

Windows build will not complete, so this is ready to merge.

@mpirvu mpirvu merged commit 7fb956b into eclipse-openj9:master Jan 8, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants