[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!)
From: |
Christopher Baines |
Subject: |
bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!) |
Date: |
Fri, 19 Apr 2024 14:19:52 +0100 |
User-agent: |
mu4e 1.12.2; emacs 29.3 |
Tony Garnock-Jones <tonyg@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
Description: PGP signature
- bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!), Tony Garnock-Jones, 2024/04/19
- bug#70474: Possible bug with `atomic-box-swap!` on OSX/M3 (?!?!),
Christopher Baines <=
- bug#70474: Also manifests on an M1 running 14.1.1 and with newer Guile versions, Tony Garnock-Jones, 2024/04/19
- bug#70474: [PATCH 1/2] Including the cast makes Apple clang 15.0.0 happy; without it, clang is sad, Tony Garnock-Jones, 2024/04/19
- bug#70474: [PATCH 2/2] Replace aarch64 CAS and atomic-swap generated JIT code with CASAL and SWPAL instructions, Tony Garnock-Jones, 2024/04/19
- bug#70474: Just adding DMB doesn't help, Tony Garnock-Jones, 2024/04/22
- bug#70474: [PATCH] Move the spin loop target to the LDAXR instruction., Tony Garnock-Jones, 2024/04/22