RFR: 8304939: os::win32::exit_process_or_thread should be marked noreturn [v5]
Julian Waters
jwaters at openjdk.org
Mon Oct 30 13:02:39 UTC 2023
On Mon, 30 Oct 2023 09:29:28 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> It has to call `exit_process_or_thread` because of the exit bug. That means we will directly call `_endthreadex` instead of implicitly doing that by having the entry function return. The `return res` is redundant but keeps the compiler happy given the required declaration of the entry method.
>
> I've been perusing the exit bug info, and ugh! But okay. The `return res` might *not* make the compiler happy
> anymore, and might instead be cause for complaint by the compiler, now that `exit_process_or_thread` is marked
> noreturn. I guess use whichever form is needed to keep the compiler from complaining...
I'm not too sure what to make of this, since I don't know what the exit bug is about (Also, the return res doesn't cause an issue on MSVC under any circumstance, and would only do so on gcc if thread_native_entry was marked noreturn, which it isn't). I simply changed the return value to keep the original semantics of the code unchanged, I guess I should take this to mean I should keep my current changes as is?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16303#discussion_r1376175889
More information about the hotspot-dev
mailing list