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

David Holmes dholmes at openjdk.org
Fri Jan 19 02:28:26 UTC 2024


On Thu, 18 Jan 2024 13:58:58 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> src/hotspot/os/windows/os_windows.cpp line 4238:
>> 
>>> 4236:     ALLOW_C_FUNCTION(::exit, ::exit(exit_code);)
>>> 4237:   } else { // EPT_PROCESS_DIE
>>> 4238:     ::_Exit(exit_code);
>> 
>> I don't see any reason to change this line.
>
> Ah, I was thinking the standard C method could be preferred over the Microsoft deprecated _exit method, but I guess that's out of scope. I'm currently working on some build dev issue, I'll change this back later on

Okay. The `_Exit` is the ISO C function, but POSIX also defines `_exit` (not that that is relevant to Windows). I can't see anything saying that Microsoft have deprecated `_exit` though:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/exit-exit-exit?view=msvc-170
If we were to change this I would still want the `ALLOW_C_FUNCTION`. Thanks

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17366#discussion_r1458202572


More information about the hotspot-runtime-dev mailing list