ARM valgrind nightly failures in cppjit were caused by a bug in valgrind. They are deterministic: the same "Unrecognised instruction at 0x35b8702c" on every nightly run. The instruction is 0x38BFC108 = LDAPRB, an ARMv8.3 FEAT_LRCPC load-acquire byte, i.e. an atomic acquire load. The JIT emits it because the arm runner's CPU supports LRCPC, but Ubuntu 24.04's valgrind 3.22.0 can't decode it, so valgrind raises SIGILL and kills pytest mid-suite. Memcheck itself reports 0 errors.
Bug: https://bugs.kde.org/show_bug.cgi?id=476465
Fix: https://sourceware.org/git/?p=valgrind.git;a=commit;h=41e2f95cf129191555e0048ccbbb392ee0fb155e
The valgrind release carrying the fix is not published for the Ubuntu version on the CI runners, so
this installs valgrind from conda-forge, which packages latest valgrind for both linux-64 and
linux-aarch64. I've verified this works on compiler-research/cppjit#29: both cells install valgrind 3.27.1 and pass on both architectures, with the previously-gated concurrency tests re-enabled on arm.
Attempt to fix the nightlies. The only remaining ARM vg nightlies fail because of a bug in valgrind:
It is deterministic: the same "Unrecognised instruction at 0x35b8702c" on every nightly run. The instruction is 0x38BFC108 = LDAPRB, an ARMv8.3 FEAT_LRCPC load-acquire byte, i.e. an atomic acquire load. The JIT emits it because the arm runner's CPU supports LRCPC, but Ubuntu 24.04's valgrind 3.22.0 can't decode it, so valgrind raises SIGILL and kills pytest mid-suite. Memcheck itself reports 0 errors. The last failure was
test_concurrent.pyaddressed in #19Bug: https://bugs.kde.org/show_bug.cgi?id=476465
Fix: https://sourceware.org/git/?p=valgrind.git;a=commit;h=41e2f95cf129191555e0048ccbbb392ee0fb155e
But as mentioned that release that has the fix is not published for the ubuntu version in the CI.