Checking memory initialization in presence of copy
and copy_nonoverlapping
produces false positives
#3347
Labels
[C] Bug
This is a bug. Something isn't working.
[F] Spurious Failure
Issues that cause Kani verification to fail despite the code being correct.
Trying to verify the following code with memory initialization checks enabled (
-Z uninit-checks
):yield the following error:
with Kani version: 0.53.0
I expected to see this happen:
According to the Rust documentaiton, both
copy
andcopy_nonoverlapping
are untyped:However, Kani treats a copy as a read followed by a write, which triggers memory initialization checks while it shouldn't. This becomes evident since the source code of
write_unaligned
copies the data byte-by-byte.The text was updated successfully, but these errors were encountered: