Skip to content

Commit

Permalink
update for merge
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerL-Y committed Jul 28, 2024
1 parent 734fb5c commit e754e5e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmark/case_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
int main(){
// int whatever;
// int * data = malloc(2*sizeof(int));
int * data2 = malloc(sizeof(int));
int i = *(data2);
int * data2 = malloc(2*sizeof(int));
int i = *(data2 + 1);
// free(data2);
// int* j = NULL;
// int* i = j;
Expand Down
1 change: 0 additions & 1 deletion src/goto-symex/dynamic_allocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,4 @@ void goto_symext::default_replace_dynamic_allocation(expr2tc &expr)
expr2tc index_expr = index2tc(size_type2(), alloc_arr_2, obj_expr);
expr = index_expr;
}
// TODO: add slhv dynamic allocation test replacement
}
11 changes: 11 additions & 0 deletions src/util/migrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2657,6 +2657,17 @@ exprt migrate_expr_back(const expr2tc &ref)
heap_update.set("byte_len", irep_idt(std::to_string(ref2.byte_len)));
return heap_update;
}
case expr2t::heap_append_id:
{
const heap_append2t &ref2 = to_heap_append2t(ref);
typet thetype = migrate_type_back(ref->type);
exprt heap_append("heap_append", thetype);
heap_append.copy_to_operands(migrate_expr_back(ref2.src_heap));
heap_append.copy_to_operands(migrate_expr_back(ref2.start_addr));
heap_append.copy_to_operands(migrate_expr_back(ref2.create_val));
heap_append.set("byte_len", irep_idt(std::to_string(ref2.byte_len)));
return heap_append;
}
case expr2t::heap_contains_id:
{
const heap_contains2t &ref2 = to_heap_contains2t(ref);
Expand Down

0 comments on commit e754e5e

Please sign in to comment.