-
Notifications
You must be signed in to change notification settings - Fork 706
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 issue in java.lang.Thread.getThreads #15619
Conversation
Should fix #15321 |
jenkins test sanity win,plinux jdk19 |
I suspect this may also fix #15355 |
The failures all occur with sanity.openjdk jenkins test sanity.openjdk all jdk19 |
Actually, this code is not correct - as soon as exclusive is released, you can no longer depend on the validity of the J9VMThread structures. |
A yuckier (but correct) solution would be to make JNI refs from all of the threadObject values and unwrap them into the final array. Creation of JNI local refs will work while holding exclusive. |
Current code holds pointers to thread objects across the call to allocate the returned array. This results in ptentially returning invalid pointers if the allocation results in a GC. Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
jenkins test sanity.openjdk win jdk19 |
Current code holds pointers to thread objects across the call to
allocate the returned array. This results in ptentially returning invalid
pointers if the allocation results in a GC.
Signed-off-by: Devin Nakamura devinn@ca.ibm.com