-
Notifications
You must be signed in to change notification settings - Fork 92
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
Buid Kani on arm linux #1367
Comments
Hello, I was a bit behind thanks to life things. I checked the model on some arm64 boards and M1s in the M1 thread and missed this new one: #1167 (comment) Summary is, it looks like the model will need to differentiate between Linux and Apple/Darwin. I've built cbmc, cbmc-viewer and run kani/kani-regression with ppc64le (only fails due to inline asm being experimental on non-mainline rust targets) so I think I can probably do this for a T1 Rust target (aarch64) as well if nobody is working on it. |
Sure! I was hoping to work on it soon, but I've had other priorities. I'd be happy to accept a PR that adds the Arm Linux machine model and gets Kani working on that platform. :) |
Ok, I'll have a go. Would definitely be good to get some reviews though, I'm learning about CBMC on the fly. |
Just adding a link to github actions issues about arm linux support: |
I'm testing the current status w.r.t. ARM64 Linux support. The development build (
This limitation comes from Kani's own checks, which I'll try to remove next. |
In addition, I haven't been able to build CBMC from source neither:
|
Update:
|
I've been able to fix the two tests above, but now there's some more failures on the
|
All these seem to be failing for the same reason, let me explain using #[test]
fn kani_concrete_playback_harness
let concrete_vals: Vec<Vec<u8>> = vec![
// 0
vec![0],
// 101
vec![101],
// 255
vec![255]
];
kani::concrete_playback_run(concrete_vals, harness);
} However, in ARM64 Linux it's print this: #[test]
fn kani_concrete_playback_harness_6199617291819462955() {
let concrete_vals: Vec<Vec<u8>> = vec![
// 0
vec![0],
// 'e'
vec![101],
// 255
vec![255],
];
kani::concrete_playback_run(concrete_vals, harness);
} Note that the interpreted value for the byte with value 101 is At first, I thought this could be a formatting issue in Kani, but apparently the value is already |
Yes, that’s CBMC’s doing: one peculiarity of ARM64 is that the char type is unsigned. That makes CBMC print ASCII characters here. |
It’s amazing how many times that choice has bitten Arm software. Either making the ‘char’ explicitly ‘signed char’ or building with ‘-fsigned-char’ should fix it. |
Thank you @tautschnig and @AGSaidi ! Got some good news: All other tests in our standard regression suites are passing 😄 |
We've got Kani building on M1, now let's get it building on arm linux.
Out of scope is CI/install, just like M1.
The text was updated successfully, but these errors were encountered: