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

Fix BoundVThreadTest - Bad Thread Object #25

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

babsingh
Copy link
Member

@babsingh babsingh commented Aug 3, 2023

After GetAllStackTraces, derive the thread object from the
stack_info array, which is filled by GetAllStackTraces.

Currently, the thread object is retrieved from the threads_ptr
array, which is filled by GetAllThreads before the call to
GetAllStackTraces. Live platform threads might have been created
or destroyed between the call to GetAllThreads and GetAllStackTraces.
This makes the threads_ptr array stale after GetAllStackTraces. A bad
thread object is accessed from the stale threads_ptr which causes a
segfault.

Related: eclipse-openj9/openj9#17868

Signed-off-by: Babneet Singh [email protected]

@babsingh babsingh force-pushed the fix_BoundVThreadTest branch from d7baaec to 41c0198 Compare August 3, 2023 20:11
@babsingh
Copy link
Member Author

babsingh commented Aug 3, 2023

@tajila Requesting your review.

See eclipse-openj9/openj9#17868 (comment) for more details about the test failure.

This PR should be merged after eclipse-openj9/openj9#17912; otherwise, this test will consistently fail.

After GetAllStackTraces, derive the thread object from the
stack_info array, which is filled by GetAllStackTraces.

Currently, the thread object is retrieved from the threads_ptr
array, which is filled by GetAllThreads before the call to
GetAllStackTraces. Live platform threads might have been created
or destroyed between the call to GetAllThreads and GetAllStackTraces.
This makes the threads_ptr array stale after GetAllStackTraces. A bad
thread object is accessed from the stale threads_ptr which causes a
segfault.

Related: eclipse-openj9/openj9#17868

Signed-off-by: Babneet Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants