Skip to content
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

Bump CBMC to version 5.72.0 #1941

Merged
merged 21 commits into from
Dec 9, 2022
Merged

Conversation

zhassan-aws
Copy link
Contributor

@zhassan-aws zhassan-aws commented Nov 28, 2022

Description of changes:

Upgrade to latest CBMC version

Resolved issues:

Resolves #705
Resolves #1226
Resolves #1657
Resolves #1673
Resolves #1676
Resolves #1748
Resolves #1786
Resolves #1823
Resolves #1946
Resolves #1958

Related RFC:

Optional #ISSUE-NUMBER.

Call-outs:

Testing:

  • How is this change tested? Added tests for the resolved issues

  • Is this a refactor change?

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@zhassan-aws zhassan-aws requested a review from a team as a code owner November 28, 2022 19:15
Copy link
Contributor

@tedinski tedinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comments, then looks great

tests/perf/vec/box_dyn/src/main.rs Outdated Show resolved Hide resolved
tests/perf/vec/string/src/main.rs Show resolved Hide resolved
@zhassan-aws
Copy link
Contributor Author

Changing to a draft PR as we'll wait for CBMC 5.72.0 to be released with a couple of bug fixes.

@zhassan-aws zhassan-aws changed the title Bump CBMC to version 5.71.0 Bump CBMC to version 5.72.0 Dec 8, 2022
@zhassan-aws zhassan-aws marked this pull request as ready for review December 9, 2022 17:02
let param = [0, 0, 0, 0];
let start = if coin { 4 } else { 0 };
copy_from_slice(&param, &mut data.array[start..start + 4]);
assert!(data.t == Type::Apple || data.t == Type::Banana);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is Banana possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

kani::assume(index < a.len());
let x = a[index].as_mut().foo();
val += x;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried that this test doesn't have any asserts on it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an assert.

let _: Result<Expr, Err7> = Result::Ok(Expr::A);
let _: Result<Expr, Err8> = Result::Ok(Expr::A);
//let _: Result<Expr, Err9> = Result::Ok(Expr::A);
let _: Result<Expr, Err10> = Result::Ok(Expr::A);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asserts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added asserts.

#[kani::unwind(3)]
fn main() {
let mut set = BTreeSet::<u32>::new();
set.insert(kani::any());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@zhassan-aws zhassan-aws merged commit 2ee2df0 into model-checking:main Dec 9, 2022
@zhassan-aws zhassan-aws deleted the cbmc-5.71 branch December 9, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment