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
I tried running the arc-swap test bench under miri with the 'many seeds' feature active.
MIRIFLAGS=-Zmiri-many-seeds=0..2000 cargo miri test
It fails after a while, with the following error:
test tests_default::rcu ... error: Undefined Behavior: out-of-bounds pointer arithmetic: alloc108734005 has been freed, so this pointer is dangling
--> /home/anders/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:1690:27
|
1690 | let arc_ptr = ptr.byte_sub(offset) as *mut ArcInner<T>;
| ^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: alloc108734005 has been freed, so this pointer is dangling
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
help: alloc108734005 was allocated here:
--> src/lib.rs:1161:44
|
1161 | let shared = ArcSwap::from(Arc::new(0));
| ^^^^^^^^^^^
...
1236 | t!(tests_default, DefaultStrategy);
| ---------------------------------- in this macro invocation
help: alloc108734005 was deallocated here:
--> src/lib.rs:1166:60
|
1166 | shared.rcu(|old| **old + 1);
| ^
...
The above is using nightly from '2025-03-15'.
The text was updated successfully, but these errors were encountered:
I've noticed that too and it doesn't even need that parameter. However, so far I haven't been able to figure out the cause of that or if it is legitimate or some kind of false alarm (I won't place a bet on either at this point ‒ reading the code does not hint at how that could be possible and eg. valgrind didn't find anything, but 🤷 )
So far, I've only figured out it is somehow related to the fallbacks inside the locking strategy.
I tried running the arc-swap test bench under miri with the 'many seeds' feature active.
It fails after a while, with the following error:
The above is using nightly from '2025-03-15'.
The text was updated successfully, but these errors were encountered: