File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
python/ql/lib/semmle/python/dataflow/new/internal Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -389,9 +389,10 @@ module LocalFlow {
389
389
or
390
390
IncludePostUpdateFlow< PhaseDependentFlow< expressionFlowStep / 2 > :: step / 2 > :: step ( nodeFrom , nodeTo )
391
391
or
392
- // Use-use flow can generate self loops. We want to filter steps from `n` to `n`
393
- // after we have included steps from `[post] n` to `n`, so after
394
- // `IncludePostUpdateFlow` has ben applied.
392
+ // Blindly applying use-use flow can result in a node that steps to itself, for
393
+ // example in while-loops. To uphold dataflow consistency checks, we don't want
394
+ // that. However, we do want to allow `[post] n` to `n` (to handle while loops), so
395
+ // we should only do the filtering after `IncludePostUpdateFlow` has ben applied.
395
396
IncludePostUpdateFlow< PhaseDependentFlow< useUseFlowStep / 2 > :: step / 2 > :: step ( nodeFrom , nodeTo ) and
396
397
nodeFrom != nodeTo
397
398
}
You can’t perform that action at this time.
0 commit comments