From b61a97049de2c64d7080e51b54fb7a088f594537 Mon Sep 17 00:00:00 2001 From: Robert Haimerl Date: Wed, 30 Oct 2024 12:36:51 +0100 Subject: [PATCH] fix meet of intervals when they do not overlap --- .../aisec/cpg/analysis/abstracteval/LatticeInterval.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt b/cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt index a01c3999d4..ccdc1a038c 100644 --- a/cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt +++ b/cpg-analysis/src/main/kotlin/de/fraunhofer/aisec/cpg/analysis/abstracteval/LatticeInterval.kt @@ -215,6 +215,8 @@ sealed class LatticeInterval : Comparable { return when { this is BOTTOM -> other other is BOTTOM -> this + // Check if the overlap at all + this.compareTo(other) != 0 -> BOTTOM this is Bounded && other is Bounded -> { val newLower = max(this.lower, other.lower) val newUpper = min(this.upper, other.upper)