Hello!

When fixing JDK-8069048 a potential race was overlooked:
1) Thread A wants to call _endthreadex() and registers itself,
2) Thread B wants to call exit(), takes its turn and raises the flag `process_exiting`, 3) Thread A continues, and gets captured in the loop at 4020, in SuspendThread(GetCurrentThread()), 4) Now, the thread B will have to wait for all the registered threads, including the thread A, which will never wake up.

Would you please help review the fix?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8160892
WEBREV: http://cr.openjdk.java.net/~igerasim/8160892/00/webrev/

With kind regards,
Ivan

Reply via email to