Skip to content

Commit 7430fde

Browse files
committed
C++: Avoid outputting a cartesian product in AliasedSSA's getOverlap.
1 parent c0a69f1 commit 7430fde

File tree

1 file changed

+5
-0
lines changed
  • cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal

1 file changed

+5
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,11 @@ private Overlap getExtentOverlap(MemoryLocation0 def, MemoryLocation0 use) {
688688
(
689689
// EntireAllocationMemoryLocation exactly overlaps itself.
690690
use instanceof EntireAllocationMemoryLocation and
691+
(
692+
def.getAnAllocation() = use.getAnAllocation() or
693+
not exists(def.getAnAllocation()) or
694+
not exists(def.getAnAllocation())
695+
) and
691696
result instanceof MustExactlyOverlap
692697
or
693698
not use instanceof EntireAllocationMemoryLocation and

0 commit comments

Comments
 (0)