Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8314743

Use of uninitialized local in SR_initialize after JDK-8314114

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • 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);
          }

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

              Created:
              Updated:
              Resolved: