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

MIR: Require users to initialize Freeze statics in specifications #1957

Open
RyanGlScott opened this issue Oct 12, 2023 · 1 comment
Open
Labels
subsystem: crucible-mir Issues related to Rust verification with crucible-mir and/or mir-json type: bug Issues reporting bugs or unexpected/unwanted behavior
Milestone

Comments

@RyanGlScott
Copy link
Contributor

(Spun out from #1941 (comment))

As of #1941, the MIR backend will initialize immutable statics before simulating a function, but it will not initialize mutable statics, instead requiring users to do so themselves. Currently, we determine this by simply checking if the static is marked mut or not, but this check is not as precise as it could be. Any type that implements the Freeze trait (e.g., AtomicU8) are compiled to mutable LLVM globals, and therefore, they can be modified at runtime. We should include Freeze-able types as part of the check.

@RyanGlScott RyanGlScott added type: bug Issues reporting bugs or unexpected/unwanted behavior subsystem: crucible-mir Issues related to Rust verification with crucible-mir and/or mir-json labels Oct 12, 2023
@RyanGlScott RyanGlScott changed the title MIR: Require users to specify Freeze statics in specifications MIR: Require users to initialize Freeze statics in specifications Oct 12, 2023
@RyanGlScott
Copy link
Contributor Author

We will also want to take Freeze-able types into account when determining the mutable allocations in the postconditions of an override.

@sauclovian-g sauclovian-g added this to the Someday milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: crucible-mir Issues related to Rust verification with crucible-mir and/or mir-json type: bug Issues reporting bugs or unexpected/unwanted behavior
Projects
None yet
Development

No branches or pull requests

2 participants