Skip to content

Commit a7d764d

Browse files
committed
Ruby: Improve join order when generating edges
1 parent 8c43ab6 commit a7d764d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ruby/ql/lib/codeql/ruby/typetracking/TypeTrackerSpecific.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ predicate basicStoreStep(Node nodeFrom, Node nodeTo, DataFlow::ContentSet conten
188188
SummarizedCallable callable, DataFlowPublic::CallNode call, SummaryComponentStack input,
189189
SummaryComponentStack output
190190
|
191-
hasStoreSummary(callable, contents, input, output) and
191+
hasStoreSummary(callable, contents, pragma[only_bind_into](input),
192+
pragma[only_bind_into](output)) and
192193
call.asExpr().getExpr() = callable.getACallSimple() and
193194
nodeFrom = evaluateSummaryComponentStackLocal(call, input) and
194195
nodeTo = evaluateSummaryComponentStackLocal(call, output)
@@ -228,7 +229,7 @@ predicate basicLoadStep(Node nodeFrom, Node nodeTo, DataFlow::ContentSet content
228229
SummarizedCallable callable, DataFlowPublic::CallNode call, SummaryComponentStack input,
229230
SummaryComponentStack output
230231
|
231-
hasLoadSummary(callable, contents, input, output) and
232+
hasLoadSummary(callable, contents, pragma[only_bind_into](input), pragma[only_bind_into](output)) and
232233
call.asExpr().getExpr() = callable.getACallSimple() and
233234
nodeFrom = evaluateSummaryComponentStackLocal(call, input) and
234235
nodeTo = evaluateSummaryComponentStackLocal(call, output)
@@ -245,7 +246,8 @@ predicate basicLoadStoreStep(
245246
SummarizedCallable callable, DataFlowPublic::CallNode call, SummaryComponentStack input,
246247
SummaryComponentStack output
247248
|
248-
hasLoadStoreSummary(callable, loadContent, storeContent, input, output) and
249+
hasLoadStoreSummary(callable, loadContent, storeContent, pragma[only_bind_into](input),
250+
pragma[only_bind_into](output)) and
249251
call.asExpr().getExpr() = callable.getACallSimple() and
250252
nodeFrom = evaluateSummaryComponentStackLocal(call, input) and
251253
nodeTo = evaluateSummaryComponentStackLocal(call, output)

0 commit comments

Comments
 (0)