Skip to content

Commit

Permalink
fix #967: null pointers in asm mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Nov 19, 2023
1 parent c5c711a commit 40ed5a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ir/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,9 @@ Pointer Memory::searchPointer(const expr &val0) const {
Pointer p(*this, i, local);
Pointer p_end = p + p.blockSize();
ret.add((p + (val - p.getAddress())).release(),
val.uge(p.getAddress()) && val.ult(p_end.getAddress()));
!local && i == 0 && has_null_block
? val == 0
: val.uge(p.getAddress()) && val.ult(p_end.getAddress()));
}
};
add(numLocals(), true);
Expand Down

0 comments on commit 40ed5a5

Please sign in to comment.