JDK-8304939 : os::win32::exit_process_or_thread should be marked noreturn
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2023-03-27
  • Updated: 2023-11-08
  • Resolved: 2023-11-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b22Fixed
Related Reports
Relates :  
Description
On Windows we have a non-trivial function (exit_process_or_thread) that provides the implementation of various functions like os::die, os::abort, &etc.  Those os functions are marked as noreturn, so this implementation helper should also be noreturn.

Current Visual Studio versions don't seem to care (or maybe we haven't enabled the appropriate warning), but using gcc to compile for Windows (JDK-8288293) warns about the os functions returning even though declared noreturn, because exit_process_or_thread is not declared noreturn.

Comments
Changeset: b4f5379d Author: Julian Waters <jwaters@openjdk.org> Date: 2023-11-01 10:42:23 +0000 URL: https://git.openjdk.org/jdk/commit/b4f5379d50db9412208552fd69bc316e7730aedd
01-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16303 Date: 2023-10-23 06:55:02 +0000
23-10-2023