Skip to content

Kani build/analysis failure on ARM macOS #1967

Closed

Description

@rod-chapman

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

  1. added
    [C] Bug
    on Dec 6, 2022
  2. tautschnig commented on Dec 6, 2022

    @tautschnig
    Member

    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 architecture is 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 __float128 is architecture and platform dependent, and fixing the architecture might help us get this right.)

  3. rod-chapman commented on Dec 6, 2022

    @rod-chapman
    Author
  4. rod-chapman commented on Dec 6, 2022

    @rod-chapman
    Author

    OK... got it... Rust calls it "aarch64", but CBMC calls it "arm64"

  5. jaisnan commented on Dec 6, 2022

    @jaisnan
    Contributor

    Merge #1968 seems to have fixed the issue on my M1 machine.

  6. celinval commented on Dec 22, 2022

    @celinval
    Contributor

    Closing this based on @jaisnan comment. @rod-chapman please feel free to reopen this if you are still bumping into the same issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions