Skip to content

Improve performance of suppression library #178

@NateD-MSFT

Description

@NateD-MSFT

The warning suppression library runs extremely slowly. Running in verbose moment with tuple counts, etc. shows most of the time is spent in this function in Suppression.qll (https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/blob/development/src/drivers/libraries/Suppression.qll):

 pragma[nomagic]
  override predicate appliesToLocation(Location l) {
    this.getFile() = l.getFile() and
    this.getLocation().getEndLine() <= l.getStartLine() and
    // If we're in a pragma push/pop, ensure the disable is too
    (
      exists(SuppressionPushPopSegment spps |
        spps.getADisablePragma() = this and
        spps.isInPushPopSegment(l)
      )
      or
      not exists(SuppressionPushPopSegment spps | spps.getADisablePragma() = this) and
      not exists(SuppressionPushPopSegment spps | spps.isInPushPopSegment(l))
    )
  }
}

This blocks #100 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions