-
Notifications
You must be signed in to change notification settings - Fork 274
Make sure pragmas propagate to all source locations #4666
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Passed Diffblue compatibility checks (cbmc commit: 9e0af23).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/112150720
The previous fix would still fail for assignments with side effects as those expressions are broken up, and the inner assignment would not have had the pragma annotated. Instead, store the pragmas in the parser's source location, which is copied to all expressions.
9e0af23
to
1b7b347
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as far as I can tell; this is still quite sparsely tested though
* aws_hash_ptr + aws_hash_c_string * suppress undefined checks * check inputs to hash functions * turn on overflow checking, will work once diffblue/cbmc#4666 is merged * whitespace change to retrigger ci * Update bounds to aws_hash_c_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * Update bounds to aws_hash_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * Update cbmc-batch.yaml files Signed-off-by: Felipe R. Monteiro <[email protected]> * Disable pointers check on parts of hashlittle2 Signed-off-by: Felipe R. Monteiro <[email protected]> * Update bounds in aws_hash_c_string and aws_hash_string proofs Signed-off-by: Felipe R. Monteiro <[email protected]> * Improve documentation on the aws_hash_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * PR comments Signed-off-by: Felipe R. Monteiro <[email protected]> * Update cbmc-batch.yaml files Signed-off-by: Felipe R. Monteiro <[email protected]> * PR comments Signed-off-by: Felipe R. Monteiro <[email protected]> * Update proofs bounds Signed-off-by: Felipe R. Monteiro <[email protected]> * Guard CPROVER pragmas with CBMC macro Signed-off-by: Felipe R. Monteiro <[email protected]> * Update postconditions Signed-off-by: Felipe R. Monteiro <[email protected]>
* aws_hash_ptr + aws_hash_c_string * suppress undefined checks * check inputs to hash functions * turn on overflow checking, will work once diffblue/cbmc#4666 is merged * whitespace change to retrigger ci * Update bounds to aws_hash_c_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * Update bounds to aws_hash_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * Update cbmc-batch.yaml files Signed-off-by: Felipe R. Monteiro <[email protected]> * Disable pointers check on parts of hashlittle2 Signed-off-by: Felipe R. Monteiro <[email protected]> * Update bounds in aws_hash_c_string and aws_hash_string proofs Signed-off-by: Felipe R. Monteiro <[email protected]> * Improve documentation on the aws_hash_string proof Signed-off-by: Felipe R. Monteiro <[email protected]> * PR comments Signed-off-by: Felipe R. Monteiro <[email protected]> * Update cbmc-batch.yaml files Signed-off-by: Felipe R. Monteiro <[email protected]> * PR comments Signed-off-by: Felipe R. Monteiro <[email protected]> * Update proofs bounds Signed-off-by: Felipe R. Monteiro <[email protected]> * Guard CPROVER pragmas with CBMC macro Signed-off-by: Felipe R. Monteiro <[email protected]> * Update postconditions Signed-off-by: Felipe R. Monteiro <[email protected]> * Adds a proof harness for the aws_hash_array_ignore_case function Signed-off-by: Felipe R. Monteiro <[email protected]> * Adds a precondition to aws_hash_array_ignore_case function Signed-off-by: Felipe R. Monteiro <[email protected]> * Adds a proof harness for aws_hash_byte_cursor_ptr_ignore_case function Signed-off-by: Felipe R. Monteiro <[email protected]> * Update the bound of aws_hash_array_ignore_case proof Signed-off-by: Felipe R. Monteiro <[email protected]> * PR comments Signed-off-by: Felipe R. Monteiro <[email protected]> * Guard CPROVER pragmas with CBMC Signed-off-by: Felipe R. Monteiro <[email protected]> * Remove meaningless const qualifiers Signed-off-by: Felipe R. Monteiro <[email protected]>
The previous fix would still fail for assignments with side effects as
those expressions are broken up, and the inner assignment would not have
had the pragma annotated. Instead, store the pragmas in the parser's
source location, which is copied to all expressions.