-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Labels
Code ContractsFunction and loop contractsFunction and loop contractsawsBugs or features of importance to AWS CBMC usersBugs or features of importance to AWS CBMC usersaws-highbugpending merge
Description
CBMC version: 5.71.0
Operating system:all
Exact command line resulting in the issue: goto-cc --export-file-local-symbols main.c
What behaviour did you expect: The static local symbol vtable_0
is present in the symbol table in mangled form
What happened instead: The static local symbol vtable_0
is absent from the symbol table.
It seems like the pass that checks if a file-local symbol needs to be exported does not search in contract clauses.
#include <stdbool.h>
#include <stdlib.h>
typedef struct vtable_s
{
int (*f)(void);
} vtable_t;
int return_0()
{
return 0;
}
static vtable_t vtable_0 = {.f = &return_0};
void foo(vtable_t *vtable)
__CPROVER_requires(NULL == vtable || &vtable_0 == vtable)
{
if(vtable->f)
vtable->f();
}
int main()
{
vtable_t *vtable;
foo(vtable);
}
goto-cc --export-file-local-symbols main.c
goto-instrument --show-symbol-table | grep vtable_0
// grep result empty
Metadata
Metadata
Assignees
Labels
Code ContractsFunction and loop contractsFunction and loop contractsawsBugs or features of importance to AWS CBMC usersBugs or features of importance to AWS CBMC usersaws-highbugpending merge