From 72f5109ec23ff34589c16fc9563a4066967792cb Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 2 Feb 2026 13:37:12 +0000 Subject: [PATCH] Python: Add more `overlay[caller]` to `Flow.qll` These were causing the repo `gufolabs/noc` to spend ~30 seconds evaluating `ControlFlowNode.strictlyDominates`. Just in case, I added `overlay[caller] to the other instances of `pragma[inline]` as well. --- python/ql/lib/semmle/python/Flow.qll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/ql/lib/semmle/python/Flow.qll b/python/ql/lib/semmle/python/Flow.qll index b29f9fd1383..94caf513aa9 100644 --- a/python/ql/lib/semmle/python/Flow.qll +++ b/python/ql/lib/semmle/python/Flow.qll @@ -194,6 +194,7 @@ class ControlFlowNode extends @py_flow_node { predicate isNormalExit() { py_scope_flow(this, _, 0) or py_scope_flow(this, _, 2) } /** Whether this strictly dominates other. */ + overlay[caller] pragma[inline] predicate strictlyDominates(ControlFlowNode other) { // This predicate is gigantic, so it must be inlined. @@ -207,6 +208,7 @@ class ControlFlowNode extends @py_flow_node { * Whether this dominates other. * Note that all nodes dominate themselves. */ + overlay[caller] pragma[inline] predicate dominates(ControlFlowNode other) { // This predicate is gigantic, so it must be inlined. @@ -216,6 +218,7 @@ class ControlFlowNode extends @py_flow_node { } /** Whether this strictly reaches other. */ + overlay[caller] pragma[inline] predicate strictlyReaches(ControlFlowNode other) { // This predicate is gigantic, even larger than strictlyDominates,