Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3097

S3516 FN when same program state on exit

    Details

    • Type: False Negative
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Symbolic Execution
    • Labels:
      None

      Description

      Because of caching of program states following function

      int foo3(boolean a) {
          int b = 12;
          if(a) {
            return b;
          }
          return b;  // false negative : caching of program states because of liveness of params makes the second path unexplored.
        }
      

      will produce false negative on RSPEC-3516, because there is only one "exit path" however there are two actual paths in the code.

      Possible solution could be to consider number of return statements instead of number of exit paths.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tibor.blenessy Tibor Blenessy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: