Skip to content

Commit

Permalink
feat(crab): use macro to avoid crab infer 0 size allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
LinerSu committed Apr 20, 2022
1 parent 78ea93e commit b099997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seahorn/lib/proof_allocators.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

void *realloc(void *ptr, size_t new_size) { return sea_realloc(ptr, new_size); }

void *bounded_malloc(size_t size) {
void *bounded_malloc_havoc(size_t size) {
#ifdef __CRAB__
assume(size > 1);
#endif
return size == 0 ? NULL : sea_malloc_havoc_safe(size);
}

void *can_fail_malloc(size_t size) {
void *can_fail_malloc_havoc(size_t size) {
#ifdef __CRAB__
assume(size > 1);
#endif
Expand Down

0 comments on commit b099997

Please sign in to comment.