RFR: 8279887: 2 Null pointer dereference defect groups in os_posix.cpp
Coleen Phillimore
coleenp at openjdk.java.net
Tue Jan 18 23:53:21 UTC 2022
On Tue, 18 Jan 2022 15:00:50 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> Please review this small fix to prevent possible Null pointer dereferences. The fix adds a Null check to prevent trying to park a Null thread. The Null check is needed because UNSAFE_ENTRY calls thread_from_jni_environment(), which returns NULL if the env thread is terminated.
>
> The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64.
>
> Thanks, Harold
Looks good to me. Seems like returning NULL for an impossible case is ok, since that's what UnPark does.
-------------
Marked as reviewed by coleenp (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7129
More information about the hotspot-dev
mailing list