Skip to content

Commit 5806183

Browse files
committed
dbg
1 parent 3fd1909 commit 5806183

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

rust/ql/src/queries/security/CWE-825/AccessAfterLifetime.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ module AccessAfterLifetimeConfig implements DataFlow::ConfigSig {
5858

5959
module AccessAfterLifetimeFlow = TaintTracking::Global<AccessAfterLifetimeConfig>;
6060

61+
private predicate sdf = AccessAfterLifetimeFlow::Debug::stage3pathNode/7;
62+
6163
predicate sourceBlock(Source s, Variable target, BlockExpr be) {
6264
AccessAfterLifetimeFlow::flow(s, _) and
6365
sourceValueScope(s, target, be.getEnclosingBlock*())

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,6 +2677,19 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26772677
c = pathNodes(node) and
26782678
c = max(pathNodes(_))
26792679
}
2680+
2681+
predicate pathNode(
2682+
Nd node, Cc cc, SummaryCtx summaryCtx, Typ t, Ap ap, TypOption stored, int c
2683+
) {
2684+
exists(TPathNodeMid(node, cc, summaryCtx, t, ap, stored)) and
2685+
c = pathNodes(node) and
2686+
// node.getLocation()
2687+
// .hasLocationInfo(any(string s | s.matches("%/compiler/rustc_span/src/lib.rs")),
2688+
// 1164, _, _, _)
2689+
node.getLocation()
2690+
.hasLocationInfo(any(string s | s.matches("%/compiler/rustc_span/src/lib.rs")),
2691+
1186, _, _, _)
2692+
}
26802693
}
26812694
/* End: Stage logic. */
26822695
}
@@ -3737,6 +3750,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
37373750

37383751
predicate stage3maxPathNodes = Stage3::Debug::maxPathNodes/7;
37393752

3753+
predicate stage3pathNode = Stage3::Debug::pathNode/7;
3754+
37403755
predicate stageStats4(
37413756
int n, string stage, int nodes, int fields, int conscand, int states, int tuples,
37423757
int calledges, int tfnodes, int tftuples

0 commit comments

Comments
 (0)