Skip to content

goto-instrument fails if code unrelated to harness contains free #8814

@hanno-becker

Description

@hanno-becker

Example:

#include <stdlib.h>
void foo(void *p) { free(p); }
void harness(void) { int x = 42; }

Instructions:

goto-cc test.c --function harness -o a.out
goto-instrument --dfcc harness a.out b.out

Fails with:

file <builtin-library-__CPROVER_contracts_library> line 1077 function __CPROVER_contracts_write_set_deallocate_freeable: no body for function 'free'
No body for 'free' during inlining
Numeric exception : 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions