You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Undefined Behavior: dereferencing pointer failed: 0x24c78[noalloc] is a dangling pointer (it has no provenance)
--> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:377:18
|
377 | unsafe { &*self.as_ptr().cast_const() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0x24c78[noalloc] is a dangling pointer (it has no provenance)
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
when we tried to backtrace the issue
// ${TOOLCHAIN}/lib/rustlib/src/rust/library/alloc/src/sync.rs:1255:18: 1255:35#[inline]fninner(&self) -> &ArcInner<T>{// This unsafety is ok because while this arc is alive we're guaranteed// that the inner pointer is valid. Furthermore, we know that the// `ArcInner` structure itself is `Sync` because the inner data is// `Sync` as well, so we're ok loaning out an immutable pointer to these// contents.unsafe{self.ptr.as_ref()}}// ...// ${TOOLCLAIN}/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:376:18: 376:33#[stable(feature = "nonnull", since = "1.25.0")]#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]#[must_use]#[inline(always)]pubconstunsafefnas_ref<'a>(&self) -> &'aT{// SAFETY: the caller must guarantee that `self` meets all the// requirements for a reference.unsafe{&*self.as_ptr()}}
The text was updated successfully, but these errors were encountered:
Hmm. I can't exactly tell what's wrong here. Could you elaborate on what the actual issue is? Or is this possibly a miri false positive, that it warns for something that is actually okay?
The source of unsoundness
reffers-rs/src/rmba.rs
Lines 167 to 174 in 5984523
To reproduce the bug
run with miri
when we tried to backtrace the issue
The text was updated successfully, but these errors were encountered: