Open
Description
When running cargo +nightly miri test
on my repo (linked below)
I get an error for a deallocation where the tag doesn't exist.
Same result for MIRIFLAGS=-Zmiri-tag-gc=0 cargo +nightly miri test
The code is definitely unsafe, but fairly straightforward with regards to allocations and deallocations. I have verified that there is exactly 1 deallocation for the allocation on the same pointer. That said, I'm not savvy with the techniques for appeasing Miri.
Here is the error output: https://gist.github.com/rrichardson/49f0c94e0cc04491ca7481e0106eb97b
My repo: https://github.com/rrichardson/bytes/tree/refactor-api
Specific offending code: https://github.com/rrichardson/bytes/blob/refactor-api/tests/extern_buf_bytes.rs#L52
Repro Steps:
- Clone the repo,
- Switch to the
refactor-api
branch - Run
cargo +nightly miri test