More places might need memory barriers on AArch64 #13055
Labels
kind:bug
A bug in the code. Does not apply to documentation, specs, etc.
platform:aarch64
topic:multithreading
topic:stdlib:concurrency
#13010 covers just one place where memory barriers are needed on AArch64. The following spec fails randomly on an M2 when
-Dpreview_mt
is provided:crystal/spec/std/mutex_spec.cr
Lines 11 to 28 in 2d49b07
This is probably due to
Mutex
using not just one, but twoAtomic
s directly. In particular,#unlock
calls@state.lazy_set
, which is non-atomic.Some other places that look suspicious:
Crystal::AtomicSemaphore
, which is part of AddProcess.on_interrupt
#13034; as of now the type is used only on x86-64 WindowsCrystal::RWLock
, which too callsAtomic#lazy_set
The text was updated successfully, but these errors were encountered: