-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
FulminateRelated to CN executable spec generation, called using `cn instrument`Related to CN executable spec generation, called using `cn instrument`bugSomething isn't workingSomething isn't working
Description
If you instrument the following program with Fulminate, and run it,
void f() /*@ requires cn_ghost u64 size; true; @*/ {}
int main() {
goto t;
t:
f(/*@ 1u64 @*/);
return 0;
}you will get like this:
> cn instrument poc.c --run
poc.c:1:23: warning: experimental keyword 'cn_ghost' (use of experimental features is discouraged)
void f() /*@ requires cn_ghost u64 size; true; @*/ {}
^~~~~~~~
Runtime typechecking of ghost arguments failed
************************************************************
Internal error: no error_msg_info available.
This is because the function call f() is not correctly instrumented; the instrumented main function (poc.exec.c) is going to be like this:
int main() {
/* EXECUTABLE CN PRECONDITION */
signed int __cn_ret = 0;
initialise_ownership_ghost_state();
initialise_ghost_stack_depth();
alloc_ghost_array(1);
initialise_exec_c_locs_mode(0);
initialise_ownership_stack_mode(0);
goto t;
t:
f(/*@ 1u64 @*/); // <--- this is not instrumented!!
{ __cn_ret = 0; goto __cn_epilogue; }
/* EXECUTABLE CN POSTCONDITION */
__cn_epilogue:
free_ghost_array();
return __cn_ret;
}misc
- CN version: 384f4f3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FulminateRelated to CN executable spec generation, called using `cn instrument`Related to CN executable spec generation, called using `cn instrument`bugSomething isn't workingSomething isn't working