Skip to content

Commit f90201e

Browse files
committed
Data flow: Remove column from mayBenefitFromCallContext
1 parent 25e2271 commit f90201e

File tree

17 files changed

+85
-126
lines changed

17 files changed

+85
-126
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll

-12
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,6 @@ private predicate functionSignature(Function f, string qualifiedName, int nparam
5454
not f.isStatic()
5555
}
5656

57-
/**
58-
* Holds if the set of viable implementations that can be called by `call`
59-
* might be improved by knowing the call context.
60-
*/
61-
predicate mayBenefitFromCallContext(DataFlowCall call, Function f) { none() }
62-
63-
/**
64-
* Gets a viable dispatch target of `call` in the context `ctx`. This is
65-
* restricted to those `call`s for which a context might make a difference.
66-
*/
67-
Function viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) { none() }
68-
6957
/** A parameter position represented by an integer. */
7058
class ParameterPosition extends int {
7159
ParameterPosition() { any(ParameterNode p).isParameterOf(_, this) }

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll

+1-3
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ private predicate functionSignature(Function f, string qualifiedName, int nparam
249249
* Holds if the set of viable implementations that can be called by `call`
250250
* might be improved by knowing the call context.
251251
*/
252-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable f) {
253-
mayBenefitFromCallContext(call, f, _)
254-
}
252+
predicate mayBenefitFromCallContext(DataFlowCall call) { mayBenefitFromCallContext(call, _, _) }
255253

256254
/**
257255
* Holds if `call` is a call through a function pointer, and the pointer

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplSpecific.qll

+4
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ module CppDataFlow implements InputSig {
2222
predicate getAdditionalFlowIntoCallNodeTerm = Private::getAdditionalFlowIntoCallNodeTerm/2;
2323

2424
predicate validParameterAliasStep = Private::validParameterAliasStep/2;
25+
26+
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
27+
28+
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
2529
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

+7-7
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,17 @@ private module Cached {
148148
import Cached
149149

150150
private module DispatchImpl {
151-
/**
152-
* Holds if the set of viable implementations that can be called by `call`
153-
* might be improved by knowing the call context. This is the case if the
154-
* call is a delegate call, or if the qualifier accesses a parameter of
155-
* the enclosing callable `c` (including the implicit `this` parameter).
156-
*/
157-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
151+
private predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
158152
c = call.getEnclosingCallable() and
159153
call.(NonDelegateDataFlowCall).getDispatchCall().mayBenefitFromCallContext()
160154
}
161155

156+
/**
157+
* Holds if the set of viable implementations that can be called by `call`
158+
* might be improved by knowing the call context.
159+
*/
160+
predicate mayBenefitFromCallContext(DataFlowCall call) { mayBenefitFromCallContext(call, _) }
161+
162162
/**
163163
* Gets a viable dispatch target of `call` in the context `ctx`. This is
164164
* restricted to those `call`s for which a context might make a difference.

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplSpecific.qll

+4
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ module CsharpDataFlow implements InputSig {
2020
Node exprNode(DataFlowExpr e) { result = Public::exprNode(e) }
2121

2222
predicate accessPathLimit = Private::accessPathLimit/0;
23+
24+
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
25+
26+
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
2327
}

docs/ql-libraries/dataflow/dataflow.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -588,18 +588,17 @@ However, joining the virtual dispatch relation with itself in this way is
588588
usually way too big to be feasible. Instead, the relation above should only be
589589
defined for those values of `call` for which the set of resulting dispatch
590590
targets might be reduced. To do this, define the set of `call`s that might for
591-
some reason benefit from a call context as the following predicate (the `c`
592-
column should be `call.getEnclosingCallable()`):
591+
some reason benefit from a call context as the following predicate:
593592
```ql
594-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c)
593+
predicate mayBenefitFromCallContext(DataFlowCall call)
595594
```
596595
And then define `DataFlowCallable viableImplInCallContext(DataFlowCall call,
597596
DataFlowCall ctx)` as sketched above, but restricted to
598-
`mayBenefitFromCallContext(call, _)`.
597+
`mayBenefitFromCallContext(call)`.
599598

600599
The shared implementation will then compare counts of virtual dispatch targets
601600
using `viableCallable` and `viableImplInCallContext` for each `call` in
602-
`mayBenefitFromCallContext(call, _)` and track call contexts during flow
601+
`mayBenefitFromCallContext(call)` and track call contexts during flow
603602
calculation when differences in these counts show an improved precision in
604603
further calls.
605604

go/ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll

-12
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,6 @@ DataFlowCallable viableCallable(DataFlowCall ma) {
104104
)
105105
}
106106

107-
/**
108-
* Holds if the set of viable implementations that can be called by `call`
109-
* might be improved by knowing the call context.
110-
*/
111-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable f) { none() }
112-
113-
/**
114-
* Gets a viable dispatch target of `call` in the context `ctx`. This is
115-
* restricted to those `call`s for which a context might make a difference.
116-
*/
117-
DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) { none() }
118-
119107
private int parameterPosition() {
120108
result = [-1 .. any(DataFlowCallable c).getType().getNumParameter()]
121109
}

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowDispatch.qll

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ private module DispatchImpl {
116116
/**
117117
* Holds if the set of viable implementations that can be called by `call`
118118
* might be improved by knowing the call context. This is the case if the
119-
* qualifier is a parameter of the enclosing callable `c`.
119+
* qualifier is a parameter of the enclosing callable of `call`.
120120
*/
121-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
122-
mayBenefitFromCallContext(call.asCall(), c.asCallable(), _)
121+
predicate mayBenefitFromCallContext(DataFlowCall call) {
122+
mayBenefitFromCallContext(call.asCall(), _, _)
123123
}
124124

125125
/**

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplSpecific.qll

+4
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ module JavaDataFlow implements InputSig {
1818
import Public
1919

2020
Node exprNode(DataFlowExpr e) { result = Public::exprNode(e) }
21+
22+
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
23+
24+
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
2125
}

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

-16
Original file line numberDiff line numberDiff line change
@@ -1009,22 +1009,6 @@ predicate attributeClearStep(Node n, AttributeContent c) {
10091009
*/
10101010
predicate isUnreachableInCall(Node n, DataFlowCall call) { none() }
10111011

1012-
//--------
1013-
// Virtual dispatch with call context
1014-
//--------
1015-
/**
1016-
* Gets a viable dispatch target of `call` in the context `ctx`. This is
1017-
* restricted to those `call`s for which a context might make a difference.
1018-
*/
1019-
DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) { none() }
1020-
1021-
/**
1022-
* Holds if the set of viable implementations that can be called by `call`
1023-
* might be improved by knowing the call context. This is the case if the qualifier accesses a parameter of
1024-
* the enclosing callable `c` (including the implicit `this` parameter).
1025-
*/
1026-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) { none() }
1027-
10281012
/**
10291013
* Holds if access paths with `c` at their head always should be tracked at high
10301014
* precision. This disables adaptive access path precision for such access paths.

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowDispatch.qll

+27-31
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ private CfgScope getTargetSingleton(RelevantCall call, string method) {
10881088
}
10891089

10901090
/**
1091-
* Holds if `ctx` targets `encl`, which is the enclosing callable of `call`, the receiver
1092-
* of `call` is a parameter access, where the corresponding argument of `ctx` is `arg`.
1091+
* Holds if `ctx` targets the enclosing callable of `call`, the receiver of `call` is a
1092+
* parameter access, where the corresponding argument of `ctx` is `arg`.
10931093
*
10941094
* `name` is the name of the method being called by `call`, `source` is a
10951095
* `LocalSourceNode` that flows to `arg`, and `paramDef` is the SSA definition for the
@@ -1098,11 +1098,11 @@ private CfgScope getTargetSingleton(RelevantCall call, string method) {
10981098
pragma[nomagic]
10991099
private predicate argMustFlowToReceiver(
11001100
RelevantCall ctx, DataFlow::LocalSourceNode source, DataFlow::Node arg, RelevantCall call,
1101-
Callable encl, string name
1101+
string name
11021102
) {
11031103
exists(
11041104
ParameterNodeImpl p, SsaDefinitionExtNode paramDef, ParameterPosition ppos,
1105-
ArgumentPosition apos
1105+
ArgumentPosition apos, Callable encl
11061106
|
11071107
// the receiver of `call` references `p`
11081108
exists(DataFlow::Node receiver |
@@ -1133,26 +1133,26 @@ private predicate argMustFlowToReceiver(
11331133
}
11341134

11351135
/**
1136-
* Holds if `ctx` targets `encl`, which is the enclosing callable of `new`, and
1136+
* Holds if `ctx` targets the enclosing callable of `new`, and
11371137
* the receiver of `new` is a parameter access, where the corresponding argument
11381138
* `arg` of `ctx` has type `tp`.
11391139
*
11401140
* `new` calls the object creation `new` method.
11411141
*/
11421142
pragma[nomagic]
11431143
private predicate mayBenefitFromCallContextInitialize(
1144-
RelevantCall ctx, RelevantCall new, DataFlow::Node arg, Callable encl, Module tp, string name
1144+
RelevantCall ctx, RelevantCall new, DataFlow::Node arg, Module tp, string name
11451145
) {
11461146
exists(DataFlow::LocalSourceNode source |
1147-
argMustFlowToReceiver(ctx, pragma[only_bind_into](source), arg, new, encl, "new") and
1147+
argMustFlowToReceiver(ctx, pragma[only_bind_into](source), arg, new, "new") and
11481148
source = trackModuleAccess(tp) and
11491149
name = "initialize" and
11501150
exists(lookupMethod(tp, name))
11511151
)
11521152
}
11531153

11541154
/**
1155-
* Holds if `ctx` targets `encl`, which is the enclosing callable of `call`, and
1155+
* Holds if `ctx` targets the enclosing callable of `call`, and
11561156
* the receiver of `call` is a parameter access, where the corresponding argument
11571157
* `arg` of `ctx` has type `tp`.
11581158
*
@@ -1161,19 +1161,18 @@ private predicate mayBenefitFromCallContextInitialize(
11611161
*/
11621162
pragma[nomagic]
11631163
private predicate mayBenefitFromCallContextInstance(
1164-
RelevantCall ctx, RelevantCall call, DataFlow::Node arg, Callable encl, Module tp, boolean exact,
1165-
string name
1164+
RelevantCall ctx, RelevantCall call, DataFlow::Node arg, Module tp, boolean exact, string name
11661165
) {
11671166
exists(DataFlow::LocalSourceNode source |
1168-
argMustFlowToReceiver(ctx, pragma[only_bind_into](source), arg, call, encl,
1167+
argMustFlowToReceiver(ctx, pragma[only_bind_into](source), arg, call,
11691168
pragma[only_bind_into](name)) and
11701169
source = trackInstance(tp, exact) and
11711170
exists(lookupMethod(tp, pragma[only_bind_into](name)))
11721171
)
11731172
}
11741173

11751174
/**
1176-
* Holds if `ctx` targets `encl`, which is the enclosing callable of `call`, and
1175+
* Holds if `ctx` targets the enclosing callable of `call`, and
11771176
* the receiver of `call` is a parameter access, where the corresponding argument
11781177
* `arg` of `ctx` is a module access targeting a module of type `tp`.
11791178
*
@@ -1182,12 +1181,11 @@ private predicate mayBenefitFromCallContextInstance(
11821181
*/
11831182
pragma[nomagic]
11841183
private predicate mayBenefitFromCallContextSingleton(
1185-
RelevantCall ctx, RelevantCall call, DataFlow::Node arg, Callable encl, Module tp, boolean exact,
1186-
string name
1184+
RelevantCall ctx, RelevantCall call, DataFlow::Node arg, Module tp, boolean exact, string name
11871185
) {
11881186
exists(DataFlow::LocalSourceNode source |
11891187
argMustFlowToReceiver(ctx, pragma[only_bind_into](source), pragma[only_bind_into](arg), call,
1190-
encl, pragma[only_bind_into](name)) and
1188+
pragma[only_bind_into](name)) and
11911189
exists(lookupSingletonMethod(tp, pragma[only_bind_into](name), exact))
11921190
|
11931191
source = trackModuleAccess(tp) and
@@ -1208,16 +1206,14 @@ private predicate mayBenefitFromCallContextSingleton(
12081206

12091207
/**
12101208
* Holds if the set of viable implementations that can be called by `call`
1211-
* might be improved by knowing the call context. This is the case if the
1212-
* receiver accesses a parameter of the enclosing callable `c` (including
1213-
* the implicit `self` parameter).
1209+
* might be improved by knowing the call context.
12141210
*/
1215-
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
1216-
mayBenefitFromCallContextInitialize(_, call.asCall(), _, c.asCallable(), _, _)
1211+
predicate mayBenefitFromCallContext(DataFlowCall call) {
1212+
mayBenefitFromCallContextInitialize(_, call.asCall(), _, _, _)
12171213
or
1218-
mayBenefitFromCallContextInstance(_, call.asCall(), _, c.asCallable(), _, _, _)
1214+
mayBenefitFromCallContextInstance(_, call.asCall(), _, _, _, _)
12191215
or
1220-
mayBenefitFromCallContextSingleton(_, call.asCall(), _, c.asCallable(), _, _, _)
1216+
mayBenefitFromCallContextSingleton(_, call.asCall(), _, _, _, _)
12211217
}
12221218

12231219
/**
@@ -1226,25 +1222,25 @@ predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
12261222
*/
12271223
pragma[nomagic]
12281224
DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
1229-
mayBenefitFromCallContext(call, _) and
1225+
mayBenefitFromCallContext(call) and
12301226
(
12311227
// `ctx` can provide a potentially better type bound
12321228
exists(RelevantCall call0, Callable res |
12331229
call0 = call.asCall() and
12341230
res = result.asCallable() and
12351231
exists(Module m, string name |
1236-
mayBenefitFromCallContextInitialize(ctx.asCall(), pragma[only_bind_into](call0), _, _,
1232+
mayBenefitFromCallContextInitialize(ctx.asCall(), pragma[only_bind_into](call0), _,
12371233
pragma[only_bind_into](m), pragma[only_bind_into](name)) and
12381234
res = getInitializeTarget(call0) and
12391235
res = lookupMethod(m, name)
12401236
or
12411237
exists(boolean exact |
1242-
mayBenefitFromCallContextInstance(ctx.asCall(), pragma[only_bind_into](call0), _, _,
1238+
mayBenefitFromCallContextInstance(ctx.asCall(), pragma[only_bind_into](call0), _,
12431239
pragma[only_bind_into](m), pragma[only_bind_into](exact), pragma[only_bind_into](name)) and
12441240
res = getTargetInstance(call0, name) and
12451241
res = lookupMethod(m, name, exact)
12461242
or
1247-
mayBenefitFromCallContextSingleton(ctx.asCall(), pragma[only_bind_into](call0), _, _,
1243+
mayBenefitFromCallContextSingleton(ctx.asCall(), pragma[only_bind_into](call0), _,
12481244
pragma[only_bind_into](m), pragma[only_bind_into](exact), pragma[only_bind_into](name)) and
12491245
res = getTargetSingleton(call0, name) and
12501246
res = lookupSingletonMethod(m, name, exact)
@@ -1257,15 +1253,15 @@ DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
12571253
exists(RelevantCall call0, RelevantCall ctx0, DataFlow::Node arg, string name |
12581254
call0 = call.asCall() and
12591255
ctx0 = ctx.asCall() and
1260-
argMustFlowToReceiver(ctx0, _, arg, call0, _, name) and
1261-
not mayBenefitFromCallContextInitialize(ctx0, call0, arg, _, _, _) and
1262-
not mayBenefitFromCallContextInstance(ctx0, call0, arg, _, _, _, name) and
1263-
not mayBenefitFromCallContextSingleton(ctx0, call0, arg, _, _, _, name) and
1256+
argMustFlowToReceiver(ctx0, _, arg, call0, name) and
1257+
not mayBenefitFromCallContextInitialize(ctx0, call0, arg, _, _) and
1258+
not mayBenefitFromCallContextInstance(ctx0, call0, arg, _, _, name) and
1259+
not mayBenefitFromCallContextSingleton(ctx0, call0, arg, _, _, name) and
12641260
result.asCallable() = viableSourceCallable(call0)
12651261
)
12661262
or
12671263
// library calls should always be able to resolve
1268-
argMustFlowToReceiver(ctx.asCall(), _, _, call.asCall(), _, _) and
1264+
argMustFlowToReceiver(ctx.asCall(), _, _, call.asCall(), _) and
12691265
result = viableLibraryCallable(call)
12701266
)
12711267
}

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplSpecific.qll

+4
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ module RubyDataFlow implements InputSig {
2727
predicate neverSkipInPathGraph = Private::neverSkipInPathGraph/1;
2828

2929
Node exprNode(DataFlowExpr e) { result = Public::exprNode(e) }
30+
31+
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
32+
33+
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
3034
}

ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected

+18-18
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,24 @@ subpaths
194194
| call_sensitivity.rb:105:10:105:10 | x | call_sensitivity.rb:178:11:178:19 | call to taint | call_sensitivity.rb:105:10:105:10 | x | $@ | call_sensitivity.rb:178:11:178:19 | call to taint | call to taint |
195195
| call_sensitivity.rb:105:10:105:10 | x | call_sensitivity.rb:187:12:187:19 | call to taint | call_sensitivity.rb:105:10:105:10 | x | $@ | call_sensitivity.rb:187:12:187:19 | call to taint | call to taint |
196196
mayBenefitFromCallContext
197-
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:50:3:52:5 | method1 |
198-
| call_sensitivity.rb:55:5:55:13 | call to method1 | call_sensitivity.rb:54:3:56:5 | method2 |
199-
| call_sensitivity.rb:59:5:59:18 | call to method2 | call_sensitivity.rb:58:3:60:5 | call_method2 |
200-
| call_sensitivity.rb:63:5:63:16 | call to method1 | call_sensitivity.rb:62:3:64:5 | method3 |
201-
| call_sensitivity.rb:67:5:67:25 | call to method3 | call_sensitivity.rb:66:3:68:5 | call_method3 |
202-
| call_sensitivity.rb:81:5:81:18 | call to method1 | call_sensitivity.rb:80:3:82:5 | method5 |
203-
| call_sensitivity.rb:89:5:89:23 | call to singleton_method1 | call_sensitivity.rb:88:3:90:5 | singleton_method2 |
204-
| call_sensitivity.rb:93:5:93:28 | call to singleton_method2 | call_sensitivity.rb:92:3:94:5 | call_singleton_method2 |
205-
| call_sensitivity.rb:97:5:97:26 | call to singleton_method1 | call_sensitivity.rb:96:3:98:5 | singleton_method3 |
206-
| call_sensitivity.rb:101:5:101:35 | call to singleton_method3 | call_sensitivity.rb:100:3:102:5 | call_singleton_method3 |
207-
| call_sensitivity.rb:105:5:105:10 | call to sink | call_sensitivity.rb:104:3:107:5 | initialize |
208-
| call_sensitivity.rb:106:5:106:13 | call to method1 | call_sensitivity.rb:104:3:107:5 | initialize |
209-
| call_sensitivity.rb:110:5:110:9 | call to new | call_sensitivity.rb:109:3:111:5 | call_new |
210-
| call_sensitivity.rb:137:5:137:18 | call to method2 | call_sensitivity.rb:136:3:138:5 | call_method2 |
211-
| call_sensitivity.rb:141:5:141:25 | call to method3 | call_sensitivity.rb:140:3:142:5 | call_method3 |
212-
| call_sensitivity.rb:149:5:149:28 | call to singleton_method2 | call_sensitivity.rb:148:3:150:5 | call_singleton_method2 |
213-
| call_sensitivity.rb:153:5:153:35 | call to singleton_method3 | call_sensitivity.rb:152:3:154:5 | call_singleton_method3 |
214-
| call_sensitivity.rb:175:3:175:12 | call to new | call_sensitivity.rb:174:1:176:3 | create |
197+
| call_sensitivity.rb:51:5:51:10 | call to sink |
198+
| call_sensitivity.rb:55:5:55:13 | call to method1 |
199+
| call_sensitivity.rb:59:5:59:18 | call to method2 |
200+
| call_sensitivity.rb:63:5:63:16 | call to method1 |
201+
| call_sensitivity.rb:67:5:67:25 | call to method3 |
202+
| call_sensitivity.rb:81:5:81:18 | call to method1 |
203+
| call_sensitivity.rb:89:5:89:23 | call to singleton_method1 |
204+
| call_sensitivity.rb:93:5:93:28 | call to singleton_method2 |
205+
| call_sensitivity.rb:97:5:97:26 | call to singleton_method1 |
206+
| call_sensitivity.rb:101:5:101:35 | call to singleton_method3 |
207+
| call_sensitivity.rb:105:5:105:10 | call to sink |
208+
| call_sensitivity.rb:106:5:106:13 | call to method1 |
209+
| call_sensitivity.rb:110:5:110:9 | call to new |
210+
| call_sensitivity.rb:137:5:137:18 | call to method2 |
211+
| call_sensitivity.rb:141:5:141:25 | call to method3 |
212+
| call_sensitivity.rb:149:5:149:28 | call to singleton_method2 |
213+
| call_sensitivity.rb:153:5:153:35 | call to singleton_method3 |
214+
| call_sensitivity.rb:175:3:175:12 | call to new |
215215
viableImplInCallContext
216216
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:55:5:55:13 | call to method1 | call_sensitivity.rb:5:1:7:3 | sink |
217217
| call_sensitivity.rb:51:5:51:10 | call to sink | call_sensitivity.rb:63:5:63:16 | call to method1 | call_sensitivity.rb:5:1:7:3 | sink |

ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import DefaultFlowTest
99
import TaintFlow::PathGraph
1010
import codeql.ruby.dataflow.internal.DataFlowDispatch as DataFlowDispatch
1111

12-
query predicate mayBenefitFromCallContext = DataFlowDispatch::mayBenefitFromCallContext/2;
12+
query predicate mayBenefitFromCallContext = DataFlowDispatch::mayBenefitFromCallContext/1;
1313

1414
query predicate viableImplInCallContext = DataFlowDispatch::viableImplInCallContext/2;
1515

0 commit comments

Comments
 (0)