This appears to make the problem go away. I'm new at working with
`lightening` so I'm not confident I've covered everything that needs
covering, particularly wrt the implementation of cas_atomic. But perhaps
this can be a foundation for someone who knows more than I do to work from.
---
I'm not sure why, exactly, but I needed this to get builds to work on
OSX Sonoma at all.
---
libguile/scmsigs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index 7fd3fd8f1..be96dbd5c 100644
--- a/libguile/scmsigs.c
+++
Oh man. This little patch all by itself makes the problem behaviour go
away. No switching to SWPAL/CASAL, just tightening the spinloop. (And no
changes at all to the CAS code, so nothing to do with the fibers bug I
guess.)
With the patch, the spinloop goes LDAXR-STLXR-CBNZ (which is what GCC
As an alternative to changing the JIT to produce SWPAL/CASAL, because I
wasn't sure if *all* aarch64 targets support these, I tried adding DMB
ISH or DMB SY to the end of the generated code sequences. Surprisingly,
this did not fix the issue! So there's perhaps something fishy about the
Andy Wingo in IRC pointed out that the reason the patch appears to work
is that the `movr` isn't idempotent! By the time it comes round again,
`val` has already been overwritten by LDAXR in the case that `dst == val`.
On 22/04/2024 10:18, Tony Garnock-Jones wrote:
Oh man. This little patch all
This is a nice idea. The way Racket does it is to make
with-output-to-string cooperate with system:
(with-output-to-string (lambda () (system "date")))
but a quick check shows that Guile does not yet have such cooperation in
place. Would that be a good place to start looking?
Tony
On
Hello all,
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
A small bit of extra information: it's not just one machine; the problem
also manifests on an M1 running OSX 14.1.1. In addition, it happens with
newer Guile versions including `guile-next` from `aconchillo`'s Homebrew
tap and including a version I built from Guile git main just now.
Regards,