From 41f71386278212e512eea15950a0c0de16105fb5 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 16 Jun 2025 13:47:51 +0200 Subject: [PATCH] Shared: Make sure `getMadRepresentation` is unique --- .../dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll index 244cc573197..e6da5d3a37f 100644 --- a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll @@ -686,6 +686,11 @@ module Make< derivedFluentFlowPush(_, _, _, head, tail, _) } + pragma[nomagic] + private string getUniqueMadRepresentation(SummaryComponent c) { + result = strictconcat(string s | s = c.getMadRepresentation() | s, "/") + } + /** * A (non-empty) stack of summary components. * @@ -732,7 +737,7 @@ module Make< exists(SummaryComponent head, SummaryComponentStack tail | head = this.head() and tail = this.tail() and - result = tail.getMadRepresentation() + "." + head.getMadRepresentation() + result = tail.getMadRepresentation() + "." + getUniqueMadRepresentation(head) ) or exists(SummaryComponent c |