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

SE engine should use LinkedHashSet everywhere

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6.7, 6.X.SE
    • Component/s: Symbolic Execution
    • Labels:
      None

      Description

      We still use ordinary HashSet in a few places (mainly in RelationalSymbolicValue) in the symbolic execution engine, which makes the algorithm undeterministic, because execution can change depending on the runtime conditions. This leads to hard to debug bugs, such as one reported here https://community.sonarsource.com/t/sonarjava-stackoverflowerror-with-squid-s2637/2970

      While using LinkedHashMap is not fixing any concrete problem, it will help to avoid such undeterministic behavior in the future, for the price of using a bit more memory.

        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: