Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ private module Input implements InputSig1, InputSig2 {
always = true
or
mayThrow(ast) and
n.isIn(ast) and
n.injects(ast) and
c.asSimpleAbruptCompletion() instanceof ExceptionSuccessor and
always = false
}
Expand Down
10 changes: 9 additions & 1 deletion python/ql/lib/semmle/python/controlflow/internal/Cfg.qll
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ class ControlFlowNode extends CfgImpl::ControlFlowNode {
}

/** Holds if this flow node strictly reaches `other`. */
predicate strictlyReaches(ControlFlowNode other) { this.getASuccessor+() = other }
overlay[caller?]
pragma[inline]
predicate strictlyReaches(ControlFlowNode other) {
this.getBasicBlock().strictlyReaches(other.getBasicBlock())
or
exists(BasicBlock block, int i, int j |
this = block.getNode(i) and other = block.getNode(j) and i < j
)
}
}

/**
Expand Down
Loading