Skip to content

Commit 249f350

Browse files
committed
Fix NewDelete.qll performance.
1 parent 548a28f commit 249f350

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/Critical/NewDelete.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ private predicate allocReaches0(Expr e, Expr alloc, string kind) {
8080
) or exists(Variable v |
8181
// alloc via a global
8282
allocReachesVariable(v, alloc, kind) and
83+
strictcount(VariableAccess va | va.getTarget() = v) <= 50 and // avoid very expensive cases
8384
e.(VariableAccess).getTarget() = v
8485
)
8586
}

0 commit comments

Comments
 (0)