RFR: 8306965: osThread allocation failures should not abort the VM

Lois Foltan lfoltan at openjdk.org
Thu May 11 00:50:44 UTC 2023


On Tue, 9 May 2023 06:03:44 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Trivial fix ... Currently OSThread allocation will abort the VM if there is not enough memory. While the fact we are exhausting C-heap means we are likely to abort for one reason or another, it isn't the role of thread starting to act as that trigger. So `new OSThread()` becomes `new (std::nothrow) OSThread()` and the existing null checks actually serve a purpose.
> 
> Change was suggested by Kim Barrett - thanks.
> 
> Testing:
>  - tiers 1-3 sanity
>  - GHA sanity
> 
> Thanks

Looks good and trivial.
- Lois

-------------

Marked as reviewed by lfoltan (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13879#pullrequestreview-1421542692


More information about the hotspot-runtime-dev mailing list