On Tue, 05 Sep 2017 00:36:34 -0700, n...@detonation.org wrote: > A golfed version that reliably fails: > > { > my Int $test-cont = 42; > ⚛$test-cont; > } > { > my atomicint $set = 0; > start { sleep 1; $set ⚛= 1 }; > until ⚛$set { } > } > > The important bit is the Int being read atomicly before reading the > atomicint. The sleep makes it fail reliably.
And that in turn got it down to being a spesh bug (this golf reliably worked with MVM_SPESH_DISABLE=1), which was that it mis-optimized the call to the wrong multi candidate, due to some bogus logging. Fixed with https://github.com/MoarVM/MoarVM/commit/5bf652edbb7f3eb067e0e753d945109282051c62 (though the spesh output it isn't too great, so I'll now see if I can do some further tweaks to get it inlining the prefix:<⚛> for atomicint). /jnthn