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

Integer to pointer cast #275

Open
vihdzp opened this issue Jul 5, 2024 · 0 comments
Open

Integer to pointer cast #275

vihdzp opened this issue Jul 5, 2024 · 0 comments

Comments

@vihdzp
Copy link

vihdzp commented Jul 5, 2024

I'm trying to use Miri on a small codebase of mine which depends on bitvec, and I'm getting warnings like this:

warning: integer-to-pointer cast
   --> C:\Users\vihdz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bitvec-1.0.1\src\ptr\span.rs:277:37
    |
277 |         self.ptr = NonNull::new_unchecked(addr_value as *mut ())
    |                                           ^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
    |
    = note: BACKTRACE on thread `mset::tests::nat`:
    = note: inside `bitvec::ptr::span::BitSpan::<bitvec::ptr::Mut>::set_address` at C:\Users\vihdz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bitvec-1.0.1\src\ptr\span.rs:277:37: 277:58
    = note: inside `bitvec::vec::BitVec::with_vec::<{closure@bitvec::vec::api::<impl bitvec::vec::BitVec>::push::{closure#0}}, ()>` at C:\Users\vihdz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bitvec-1.0.1\src\vec.rs:661:4: 661:61
    = note: inside `bitvec::vec::api::<impl bitvec::vec::BitVec>::push` at C:\Users\vihdz\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bitvec-1.0.1\src\vec\api.rs:623:4: 623:42

It seems the issue is that this crate doesn't adhere to the still experimental strict provenance API. Is this a problem that can be dealt with, or is it just something to live with for the forseeable future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant