Skip to content

Commit 8a73bea

Browse files
C++: Avoid bad join ordering in getOperandMemoryAccess
1 parent 4170d4f commit 8a73bea

File tree

1 file changed

+3
-2
lines changed
  • cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ MemoryAccess getOperandMemoryAccess(Operand operand) {
268268
if exists(IRVariable var, IntValue i |
269269
resultPointsTo(operand.getAddressOperand().getDefinitionInstruction(), var, i)
270270
)
271-
then exists(IRVariable var, IntValue i |
271+
then exists(IRVariable var, IntValue i, int size |
272272
resultPointsTo(operand.getAddressOperand().getDefinitionInstruction(), var, i) and
273-
result = getVariableMemoryAccess(var, i, operand.getDefinitionInstruction().getResultSize())
273+
result = getVariableMemoryAccess(var, i, size) and
274+
size = operand.getDefinitionInstruction().getResultSize()
274275
)
275276
else (
276277
result = TUnknownMemoryAccess(TUnknownVirtualVariable(operand.getInstruction().getFunctionIR())) and

0 commit comments

Comments
 (0)