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

Julian Waters jwaters at openjdk.org
Mon Jan 15 15:34:19 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

I think VMError::report_and_die calls os::exit and os::abort (both of which call exit_process_or_thread), and vaguely also remember it calling raise_fail_fast, but to answer that question definitively, probably need Kim's confirmation. Can do on that second part, but out of curiosity, is there a difference between std:: and :: for C methods?

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

PR Comment: https://git.openjdk.org/jdk/pull/17366#issuecomment-1892387656


More information about the hotspot-runtime-dev mailing list