RFR: 8323576: [Windows] Fallthrough to ::abort instead of os::infinite_sleep for noreturn methods [v3]
Kim Barrett
kbarrett at openjdk.org
Thu Mar 28 17:51:34 UTC 2024
On Sun, 21 Jan 2024 07:15:49 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 ::abort instead, like other platforms do, to align Windows with them
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>
> Partially revery os_windows.cpp
Looks good.
I wondered whether we should be concerned about the Microsoft-specific
behavior of abort.
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/abort?view=msvc-170
But these are supposed to be unreachable code paths. And we already use abort
in other places.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17366#pullrequestreview-1966881698
More information about the hotspot-runtime-dev
mailing list