bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!)

Christopher Baines <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Tony Garnock-Jones <[email protected]> writes:

> I'm seeing some very strange behaviour from `atomic-box-swap!` (but
> not `atomic-box-compare-and-swap!`) on Guile 3.0.9 from Homebrew on
> OSX Sonoma using an M3 Pro cpu. The issue does not seem to manifest on
> x86_64. Could it be some interaction between Guile and M3 CPUs?
>
> Or am I just doing something very silly that shouldn't work at all and
> just happens to look like it works on x86_64?
>
> Here's the program that fails. It will run for a few hundred million
> rounds and then yield "q null in get". Note that using CAS seems to
> work, but plain old swap doesn't.

There are known issue(s) with Guile JIT and atomics on ARM
(e.g. [1]). If the problem doesn't appear when disabling JIT, then
you're probably seeing the same issue.

1: https://github.com/wingo/fibers/issues/83
signature.asc (application/pgp-signature, 987 B)
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYib3hfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdcGA//Qv+7hdmyETA6quu0eSzC5hr+q0Me//xp
3E0sYsZIp4Vm6q4qsNdTpOv+2BzcM+UsqRPQa/BCwCcfQGNXlVOEkCkO//QmbjW1
hCwFuKJq/3LKwvqYu1r5+tqYUYnNvfwzbhf7z63SXqww3SeR1rjGsjIG0tTLUzOl
PNy9eseYVMGQzKgqV7kG8B14eyYMawHnFcTk+PBrM9ctX0esfvDYFrTcz50TIXVK
50Djlq6oDNpzd5pxiJxK1FgSpmcNrWnoNcmAHSSsLHzabAMpzIFQ7x5SV1la7+k+
YygFfCe4/pDQJ6VwJfJmPn3K+MAF1oB/zrGnRYIg4M+b0rr+1NK0vFRQiTeFaywL
4EjNI+zeREVWdl/sgXoHZtzpXRuZnhYjy3pq/xMLkrOIJy4qwXbTqzB3nu4d4/2Y
jJvYd7lT+cMqrEYLZqQ19yoHADSr9OCswQq8MAMqMqt1SIk/AS4cKD6LWDmoHrXM
qWi7/3zg0GYhbyHi6lT9rHR9BXtz4czE2rCUP6MrhtXec3qdEXki1xRt6H1Aju6u
4enJcd0pCMPYCWRp3ZktvkWGx0QllF7w3RODOfAXgWU0c8H5Xll25skkCdn2O2r7
E0G69s7++rtMYGzxXsQ3owHi1rOVE05fvPoflj7Nv35eBFupbTNnh7YqfYg2A5+f
jcXRZxREh+s=
=OPiV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.