Skip to content

Commit ad2c383

Browse files
committed
C++: Fix the join order in two places in the IR dataflow library
Not having these fixed caused problems when updating the database stats file.
1 parent 3719353 commit ad2c383

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ private module Cached {
241241
// For compatibility, send flow from arguments to parameters, even for
242242
// functions with no body.
243243
exists(FunctionCall call, int i |
244-
sink.asExpr() = call.getArgument(i) and
245-
result = resolveCall(call).getParameter(i)
244+
sink.asExpr() = call.getArgument(pragma[only_bind_into](i)) and
245+
result = resolveCall(call).getParameter(pragma[only_bind_into](i))
246246
)
247247
or
248248
// For compatibility, send flow into a `Variable` if there is flow to any

cpp/ql/lib/semmle/code/cpp/ir/dataflow/ResolveCall.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ private import semmle.code.cpp.ir.IR
1515
* a virtual member function, simple data flow analysis is performed in order
1616
* to identify the possible target(s).
1717
*/
18-
Function resolveCall(Call call) {
18+
pragma[nomagic]
19+
Function resolveCall(Call call) {
1920
exists(CallInstruction callInstruction |
2021
callInstruction.getAST() = call and
2122
result = viableCallable(callInstruction)

0 commit comments

Comments
 (0)