I am trying to reproduce the Kani analysis of s2n-quic, but using an ARM-based macOS laptop. I have Rust (1.57, stable, and nightly toolchains), Kani 0.16.0 and GCC 12.1.0 (aarch64-apple-darwin) installed. Running "cargo kani --tests" in s2n-quic-core fails with ``` Finished test [unoptimized + debuginfo] target(s) in 14.71s /opt/gcc-12.1.0-aarch64/lib/gcc/aarch64-apple-darwin21/12.1.0/include/stddef.h:432:1: error: syntax error before '__float128' __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); PARSING ERROR Error: goto-cc exited with status exit status: 1 ``` I don't think that GCC predefines type __float128 on aarch64.
Activity
tautschnig commentedon Dec 6, 2022
I believe the problem might be https://github.com/model-checking/kani/blob/main/kani-compiler/src/codegen_cprover_gotoc/context/goto_ctx.rs#L463..L479: this value of
architectureis to be processed by CBMC, which should configure itself accordingly. But "aarch64" is not an architecture known by CBMC. The correct string here is "arm64". (Further context: the presence/absence of__float128is architecture and platform dependent, and fixing the architecture might help us get this right.)rod-chapman commentedon Dec 6, 2022
Not sure... This page:
https://doc.rust-lang.org/beta/nightly-rustc/rustc_target/spec/struct.Target.html
seems to suggest that the architecture should be "aarch64" after all...
rod-chapman commentedon Dec 6, 2022
OK... got it... Rust calls it "aarch64", but CBMC calls it "arm64"
jaisnan commentedon Dec 6, 2022
Merge #1968 seems to have fixed the issue on my M1 machine.
celinval commentedon Dec 22, 2022
Closing this based on @jaisnan comment. @rod-chapman please feel free to reopen this if you are still bumping into the same issue. Thanks!