model-checking / kani

Kani Rust Verifier
https://model-checking.github.io/kani
Apache License 2.0
2.24k stars 93 forks source link

Model checking allocation failure #891

Open tedinski opened 2 years ago

tedinski commented 2 years ago

We should introduce a flag (and an associated proof harness annotation) to enable --malloc-can-fail in CBMC.

At first, this might seem useless, because many std data structures will simply panic on allocation failure. (And without #692, this just means all such proof harnesses would just have failures that are unavoidable.)

But there is no-std Rust code out there that might be very interested and could use this feature.

tedinski commented 2 years ago

Also note that because we currently override std to override macros definitions, we'll have to do some additional work to specifically support verifying no_std code. That prerequisite might make this not totally "Exp: easy" anymore.