-
Notifications
You must be signed in to change notification settings - Fork 273
Performance problem with --pointer-checks, --pointer-primitive-checks #7378
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
Can we get a status update? |
@tautschnig is the root cause the same as #7377? |
#7395 is a step towards this but not a complete solution. |
#7702 might be the next piece in this puzzle. Evaluation on the benchmarks of this issue yet to be done. |
A belated update on this:
I'd like to propose the following, and would like to get input from @jimgrundy @kroening @remi-delmas-3000 as well as anyone else who would like to voice their opinion:
|
Resolving as of 6f3c16c: running |
This branch contains the problematic model https://github.com/remi-delmas-3000/cbmc/tree/record-write-v-minimized
The
s2n_record_writev.c
model reveals several problems, described inregression/contracts/s2n_record_writev/RUNME.sh
.In short:
goto-cc s2n_record_writev.c
produces a modela.out
that can be analysed directly bycbmc
with pointer checks and pointer primitive checks without problems.goto-instrument a.out b.out
without options turnsa.out
into a slightly different modelb.out
that makescbmc --pointer-checks --pointer-primitive-checks b.out
explode in size during CNF translationstruct s2n_hash_state
seems to have a side effect on another pointer of the struct (removing the nondet assignment from the C file solves all performance problems);assert(pointer_offset(object) >= constant)
instead ofassert(!(pointer_offset(object) < constant))
seems to result in large CNF size differences;rw_ok
checks and pointer checks (the expression of the pointer being checked contains byte_extracts and has multiple individual occurrences in the check expression.);goto-instrument
pass expands therw_ok
assertion contained ina.out
and that the resulting expressions inb.out
get themselves instrumented as if they were user code. (this could explain the difference in number of generated POs betweena.out
(Generated 445 VCC(s), 19 remaining after simplification) andb.out
(Generated 529 VCC(s), 103 remaining after simplification)).It could be possible to add
disable:pointer-check
,disable:pointer-primitive-check
,disable:pointer-overflow-check
pragmas to avoid the expanded expression being itself instrumented in later passes (if this is what happens).CBMC version: 5.70 +
Operating system: linux, macOS
Exact command line resulting in the issue: see regression/contracts/s2n_record_writev/RUNME.sh
What behaviour did you expect: analysis terminates
What happened instead: analysis saturates RAM (128gigs)
The text was updated successfully, but these errors were encountered: