Skip to content

Commit a122567

Browse files
committed
Python: Add implementation note about why not targeting ESSA node
1 parent 44c6717 commit a122567

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ predicate runtimeJumpStep(Node nodeFrom, Node nodeTo) {
468468
// function, while the default value itself will be in the scope that _defines_ the
469469
// function.
470470
exists(ParameterDefinition param |
471+
// note: we go to the _control-flow node_ of the parameter, and not the ESSA node of the parameter, since for type-tracking, the ESSA node is not a LocalSourceNode, so we would get in trouble.
471472
nodeFrom.asCfgNode() = param.getDefault() and
472473
nodeTo.asCfgNode() = param.getDefiningNode()
473474
)

0 commit comments

Comments
 (0)