Use of uninitialized local in SR_initialize after JDK-8314114

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 22
    • Component/s: hotspot
    • b12

      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);
          }

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: