Skip to content

Commit a58c16f

Browse files
committed
Python: Prevent bad magic during pruning.
Fixes the performance regression seen on `uncompyle2` and similar projects.
1 parent 3501778 commit a58c16f

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)