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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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 <despresc@ibm.com>
@cjjdespres cjjdespres force-pushed the fix-overlapping-segment-test branch from 9d8a2f6 to a464dc4 Compare May 21, 2024 01:19
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants