RFR: 8323576: [Windows] Fallthrough to std::abort instead of os::infinite_sleep for noreturn methods

David Holmes dholmes at openjdk.org
Sun Jan 14 21:52:18 UTC 2024


On Thu, 11 Jan 2024 08:31:21 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> os::infinite_sleep should only be used in very specific scenarios, and using it to satisfy compiler requirements for [[noreturn]] marked methods is a bad idea, since in the impossible case this will cause HotSpot to hang for a seemingly unknown reason. Fallthrough to std::abort instead, like other platforms do, to align Windows with them

We don't use `std::exit` or `std::abort`, we just use the C library methods.

Why not just use `ShouldNotReachHere()`?

Thanks

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

Changes requested by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17366#pullrequestreview-1820305906


More information about the hotspot-runtime-dev mailing list