Skip to content

Commit

Permalink
Fix bug hit by a test
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler committed Oct 11, 2024
1 parent 0331ebe commit 87755ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crab/ebpf_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,10 +2056,10 @@ void ebpf_domain_t::do_mem_store(const Mem& b, Type val_type, SValue val_svalue,
if (b.access.basereg.v == R10_STACK_POINTER) {
auto r10_stack_offset = reg_pack(b.access.basereg).stack_offset;
const auto r10_interval = m_inv.eval_interval(r10_stack_offset);
assert(r10_interval.is_singleton());
const int32_t stack_offset = r10_interval.singleton()->cast_to<int32_t>();
const number_t base_addr{stack_offset};
do_store_stack(m_inv, width, base_addr + offset, val_type, val_svalue, val_uvalue, val_reg);
if (r10_interval.is_singleton()) {
const int32_t stack_offset = r10_interval.singleton()->cast_to<int32_t>();
const number_t base_addr{stack_offset};
}
return;
}
m_inv = type_inv.join_over_types(m_inv, b.access.basereg, [&](NumAbsDomain& inv, const type_encoding_t type) {
Expand Down

0 comments on commit 87755ad

Please sign in to comment.