JDK-8314743 : Use of uninitialized local in SR_initialize after JDK-8314114
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-22
  • Updated: 2023-08-28
  • Resolved: 2023-08-23
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 b12Fixed
Related Reports
Relates :  
Description
After JDK-8314114, SonarCloud reports the use on uninitialized `sig` variable in the `warning` line here:
 
int SR_initialize() {
...
    int sig;
    bool result = parse_integer(s, &sig);
    if (result && sig > MAX2(SIGSEGV, SIGBUS) &&  // See 4355769.
        sig < NSIG) {                   // Must be legal signal and fit into sigflags[].
      PosixSignals::SR_signum = sig;
    } else {
      warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.",
              sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, PosixSignals::SR_signum);
    }

Comments
Changeset: 2be469f8 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2023-08-23 07:17:29 +0000 URL: https://git.openjdk.org/jdk/commit/2be469f89ec10471e893045e606e1e2558f4e363
23-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15381 Date: 2023-08-22 08:14:12 +0000
22-08-2023