Repository navigation
Conversation
The AArch64 model set char_is_unsigned for every OS. That holds on Linux, but char is signed on Apple arm64 (Apple's "Writing ARM64 code for Apple platforms", core::ffi::c_char on aarch64-apple-darwin, and CBMC's own macOS arm64 configuration). Host runs on macOS hide this today, because goto-cc compiles kani_lib.c with the host's configuration during the link and replaces the symbol Kani wrote. It still reaches the C char type kani-compiler gives string constants, and any change that keeps Kani's written model in the linked binary would expose it. Make it depend on the OS, as wchar_t_is_unsigned already does, and split the table out of new_machine_model so a unit test can check it without a rustc session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M1dgc2zy347cbi6td1Wd4x
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on
main, independent of #4913. It merges cleanly with it.The AArch64 machine model sets
char_is_unsignedfor every OS. That is right on Linux, butcharis signed on Apple arm64: see Apple's "Writing ARM64 code for Apple platforms",core::ffi::c_charonaarch64-apple-darwin, and CBMC's own macOS arm64 configuration.Host runs on macOS hide this today, because goto-cc compiles
kani_lib.cwith the host's configuration during the link and replaces the symbol Kani wrote. It still reaches the Cchartype kani-compiler gives string constants. Once #4913 keeps Kani's written model in the linked binary for a non-host--target,--target aarch64-apple-darwinfrom another host would check C code with unsignedchar.char_is_unsignednow depends on the OS, aswchar_t_is_unsignedalready does. The table is split out ofnew_machine_modelso a unit test can check it without a rustc session.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M1dgc2zy347cbi6td1Wd4x