Skip to content

Commit 8aa6b1a

Browse files
committed
Python: use standard tracking construction
1 parent 42ae5f4 commit 8aa6b1a

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

python/ql/src/semmle/python/frameworks/Stdlib.qll

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -966,21 +966,8 @@ private module Stdlib {
966966
result.(DataFlow::CallCfgNode).getFunction() = returnsPath
967967
)
968968
or
969-
// Due to bad performance when using normal setup with `path(t2).track(t2, t)`
970-
// we have inlined that code and forced a join
971-
exists(DataFlow::TypeTracker t2 |
972-
exists(DataFlow::StepSummary summary |
973-
pathlibPath_first_join(t2, result, summary) and
974-
t = t2.append(summary)
975-
)
976-
)
977-
}
978-
979-
pragma[nomagic]
980-
private predicate pathlibPath_first_join(
981-
DataFlow::TypeTracker t2, DataFlow::Node res, DataFlow::StepSummary summary
982-
) {
983-
DataFlow::StepSummary::step(pathlibPath(t2), res, summary)
969+
// Track further
970+
exists(DataFlow::TypeTracker t2 | result = pathlibPath(t2).track(t2, t))
984971
}
985972

986973
/** Gets a reference to a `pathlib.Path` object. */

0 commit comments

Comments
 (0)