Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/more anon race cond improvements #35

Merged

Conversation

hex0punk
Copy link
Contributor

  • Removed a number of unnecessary FP/pattern-not cases. For instance, none of these were needed, because the innermost metavariable has a different name, indicating that it is not using a loop variable being memory aliased, which is what this is trying to find.
    - pattern-not: |
        for $X, $Y := range ... {
          ...
          go func(..., $V, ...){
            ...
            $FOO(..., $V, ...)
            ...
          }(..., $Y, ...)
          ...
        }
    - pattern-not: |
        for $Y, $X := range ... {
          ...
          go func(..., $CP, ...){
            ...
            $CP(...)
            ...
          }($X)
          ...
        }
    - pattern-not: |
        for $X:=...;$Y;$Z {
          ...
          go func(..., $V, ...) {
            ...
            $FOO(..., $V,...)
            ...
          }(..., $X, ...)
          ...
        }
  • Added a couple additional -pattern-not rules based on FP I have seen detected recently, along with related tests

Copy link
Contributor

@Vasco-jofra Vasco-jofra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the update!

@Vasco-jofra Vasco-jofra merged commit 626932d into trailofbits:main Aug 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants