Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ffb67a

Browse files
authored
Merge pull request #2266 from tausbn/python-multiple-calls-to-init-join-order-fix
Python: Fix bad join order for `py/multiple-calls-to-init`.
2 parents 2b120de + 2b24eb2 commit 9ffb67a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

python/ql/src/Classes/MethodCallOrder.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ import python
33
// Helper predicates for multiple call to __init__/__del__ queries.
44

55
pragma [noinline]
6-
private predicate multiple_invocation_paths(FunctionInvocation top, FunctionInvocation i1, FunctionInvocation i2, FunctionObject multi) {
6+
private predicate multiple_invocation_paths_helper(FunctionInvocation top, FunctionInvocation i1, FunctionInvocation i2, FunctionObject multi) {
77
i1 != i2 and
88
i1 = top.getACallee+() and
99
i2 = top.getACallee+() and
10-
i1.getFunction() = multi and
10+
i1.getFunction() = multi
11+
}
12+
13+
pragma [noinline]
14+
private predicate multiple_invocation_paths(FunctionInvocation top, FunctionInvocation i1, FunctionInvocation i2, FunctionObject multi) {
15+
multiple_invocation_paths_helper(top, i1, i2, multi) and
1116
i2.getFunction() = multi
1217
}
1318

0 commit comments

Comments
 (0)