Skip to content

Commit

Permalink
Only set type to packet if the width is correct
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler committed Jan 29, 2024
1 parent f3964ef commit 5309cf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crab/ebpf_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1906,11 +1906,11 @@ void ebpf_domain_t::do_load_ctx(NumAbsDomain& inv, const Reg& target_reg, const

number_t addr = *maybe_addr;

if (addr == desc->data) {
if ((addr == desc->data) && (width == desc->end - desc->data)) {
inv.assign(target.packet_offset, 0);
} else if (addr == desc->end) {
} else if ((addr == desc->end) && (width == desc->meta - desc->end)) {
inv.assign(target.packet_offset, variable_t::packet_size());
} else if (addr == desc->meta) {
} else if ((addr == desc->meta) && (width == desc->size - desc->meta)) {
inv.assign(target.packet_offset, variable_t::meta_offset());
} else {
if (may_touch_ptr)
Expand Down

0 comments on commit 5309cf5

Please sign in to comment.