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

Previous Next

Package: guile;

Reported by: Tony Garnock-Jones <tonyg <at> leastfixedpoint.com>

Date: Fri, 19 Apr 2024 12:11:04 UTC

Severity: normal

Full log


Message #8 received at 70474 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Tony Garnock-Jones <tonyg <at> leastfixedpoint.com>
Cc: 70474 <at> debbugs.gnu.org
Subject: Re: bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!)
Date: Fri, 19 Apr 2024 14:19:52 +0100
[Message part 1 (text/plain, inline)]
Tony Garnock-Jones <tonyg <at> leastfixedpoint.com> 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, inline)]

This bug report was last modified 1 year and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.