-
Notifications
You must be signed in to change notification settings - Fork 273
goto-cc incompatible with cbmc's --malloc-may-fail and --malloc-fail-null #5492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure how this effects the "implemented as a transform" vs. "implemented as a library" debate. |
I am not sure why this is needed given you can just pass these flags to |
We generate the Is there any way we could capture the intermediate |
|
Thanks @martin-cs. So I was wondering if we could capture the goto program after |
What kind of instrumentation are you doing? Off the top of my head I'd say it's probably not a good idea to modify the function bodies of the internal C library, which is really the only sort of instrumentation I can think of that wouldn't be possible this way. |
@SaswatPadhi In which case, this incompatibility is what needs to be fixed, not changing the workflow. @hannes-steffenhagen-diffblue / @danpoe who implemented |
@martin-cs they're part of the model for malloc. All these flags are doing is setting
(There's currently also |
@hannes-steffenhagen-diffblue Thanks; please forgive my misunderstanding. That is, IMHO, the right way to do things. In which case is it just that the initialisation code that |
@martin-cs: I think the issue is related to the one that occurred here #5272 - goto-cc sets default values for the globals, which cbmc doesn't override. |
That would sound believable. Regenerating the initialisation code should be sufficient to fix this. |
CBMC version: 5.13.0
Operating system: Linux 64-bit
Minimal example:
cbmc --malloc-may-fail --malloc-fail-null test.c
correctly detects a bug in this .c file.When we run
goto-cc test.c -o test.goto
, and then runcbmc --malloc-may-fail --malloc-fail-null test.goto
, cbmc incorrectly reports successful verification.Currently,
goto-cc
does not accept these two malloc flags, so we cannot add them to thegoto-cc
invocation.What behaviour did you expect:
What happened instead:
The text was updated successfully, but these errors were encountered: