Ruby/Python: add recursion guard

This commit is contained in:
Asger F
2023-09-01 14:00:38 +02:00
parent 14c71a351e
commit 13d01f1ec4
2 changed files with 14 additions and 1 deletions

View File

@@ -588,7 +588,13 @@ private module Cached {
n in [-1 .. 10] and
splatPos = unique(int i | splatArgumentAt(c, i) and i > 0)
} or
TCaptureNode(VariableCapture::Flow::SynthesizedCaptureNode cn)
TCaptureNode(VariableCapture::Flow::SynthesizedCaptureNode cn) or
TForbiddenRecursionGuard() {
none() and
// We want to prune irrelevant models before materialising data flow nodes, so types contributed
// directly from CodeQL must expose their pruning info without depending on data flow nodes.
(any(ModelInput::TypeModel tm).isTypeUsed("") implies any())
}
class TSelfParameterNode = TSelfMethodParameterNode or TSelfToplevelParameterNode;