Skip to content

Commit 857cd91

Browse files
author
Mark Shannon
authored
Merge pull request #1782 from taus-semmle/python-pruning-nomagic
Python: Prevent bad magic during pruning.
2 parents c2d1a52 + a58c16f commit 857cd91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/ql/src/semmle/python/Pruning.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ module Pruner {
525525
}
526526

527527
/** Holds if `cond` holds for `var` on conditional edge `pred` -> `succ` as a result of the test for that edge */
528+
pragma [nomagic]
528529
predicate constraintOnBranch(UnprunedBasicBlock pred, UnprunedBasicBlock succ, Constraint cond, SsaVariable var) {
529530
cond = constraintFromTest(var, pred.last()) and
530531
succ = pred.getATrueSuccessor()

0 commit comments

Comments
 (0)