Skip to content

Commit 3b2512f

Browse files
committed
C++: pragma[nomagic] in Overflow.qll
These two predicates were supposed to be fast but became slow after the recent inlining of `unresolve`.
1 parent 6ccd208 commit 3b2512f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/src/semmle/code/cpp/security/Overflow.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ predicate guardedAbs(Operation e, Expr use) {
1313
}
1414

1515
/** is the size of this use guarded to be less than something? */
16+
pragma[nomagic]
1617
predicate guardedLesser(Operation e, Expr use) {
1718
exists(IfStmt c, RelationalOperation guard |
1819
use = guard.getLesserOperand().getAChild*() and
@@ -33,6 +34,7 @@ predicate guardedLesser(Operation e, Expr use) {
3334
}
3435

3536
/** is the size of this use guarded to be greater than something? */
37+
pragma[nomagic]
3638
predicate guardedGreater(Operation e, Expr use) {
3739
exists(IfStmt c, RelationalOperation guard |
3840
use = guard.getGreaterOperand().getAChild*() and

0 commit comments

Comments
 (0)