Repository navigation
CI: run the ASan Linux job on ARM too, instrumenting the ASIMD build - #263
Conversation
tdulcet
left a comment
There was a problem hiding this comment.
Thanks for the PR.
Instead of adding a new CI job for this, could you instead update the matrix for the existing ASan Linux job to also run on a ARM runner. That would eliminate the duplication.
3f76aa1 to
35b9549
Compare
|
Done - the ARM run is now a cell of the existing The matrix is Two other things fell out of the merge:
I kept the assertion that the binary really reports Since the matrix now puts clang on ARM as well, I checked that too on aarch64 hardware: the SIMD-heaviest translation units - |
|
Follow-up with the numbers I said I was missing when I gated the medium tier, now that the ARM build has finished here. Debian 12 / gcc 12.2, native ASIMD,
And the ASIMD guard checked against a real binary rather than just against Given Since the runners are backed up (this PR's run has been fully queued for three hours), I also verified the restructured job's shell logic directly, by extracting the
That covers the part I would otherwise only find out about from a failed CI run: the |
|
The ASan-Linux cells on this PR are failing, and I want to get ahead of it: the failure is pre-existing on What it is
That line is the scalar-double Fermat carry, Minimal reproducer, no CI needed: #156 fixes itSame command, same build settings, against #156:
#156 is a one-word change - So #156 is what is keeping (The remaining What this PR's own run did establish
|
35b9549 to
8d97286
Compare
b8ec182 to
0498be1
Compare
…rumenting the ASIMD build) into all-fixes-integration-v5 # Conflicts: # .github/workflows/ci.yml
…rumenting the ASIMD build) into all-fixes-integration-v5 # Conflicts: # .github/workflows/ci.yml
Every sanitizer job is pinned to NOSIMD, because macOS cannot assemble the
hand-tuned SIMD under -Og ("invalid CFI advance_loc expression"). That leaves
nothing anywhere in CI that builds SIMD asm under a sanitizer - yet issue primesearch#12,
a SEGV in radix48_dit_pass1 during 'Mlucas -s m', was reported by ASan on an
ARM runner.
aarch64/Linux does not have the macOS assembler problem, so add
ubuntu-24.04-arm to the ASan-Linux matrix and let makemake.sh auto-detect
there, which selects ASIMD. The job asserts the binary really is the SIMD one
- makemake.sh announces the mode on stdout but does not record it in
build.log, so a check against the build log would silently pass while testing
nothing; it greps the run instead. Without that the ARM cells would quietly
degrade into duplicates of the x86 ones the moment auto-detection changed.
config-fermat.sh and the Mfactor self-tests run from the NOSIMD builds on
aarch64, the same substitution the Linux and Singlethread-Linux jobs already
make: ASIMD's trial-factoring routines are stubs.
the two do not overlap.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The probe runs the binary only to read 'Build uses ARMv8 advanced-SIMD' out of
its banner, but the step runs under set -e, so now that the self-test returns a
status - 2 on a stock build, where 1K has no usable radix set - the run ends
there and the grep that is the actual check never happens:
+ cd obj
+ [[ -z '' ]]
+ ./Mlucas -s tt -cpu 0
##[error]Process completed with exit code 2.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0498be1 to
9f58092
Compare
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
tdulcet
left a comment
There was a problem hiding this comment.
Thanks, this looks much better. I just have a few minor nits.
…robe The ASan Linux job now builds the runner's native mode on both architectures: AVX2 or AVX-512 on x86, ASIMD on ARM. This replaces the separate x86 SIMD job proposed in primesearch#221. config-fermat.sh still runs from the NOSIMD build on ARM, as in the Linux job. Also, per review: run the ARM cell on ubuntu-26.04-arm, test $HOSTTYPE directly, and drop the check that the ARM binary is an ASIMD build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. I've applied all three, and I've folded #221 into this PR as you suggested there: the job now builds the native SIMD mode on x86 as well (AVX2 or AVX-512, depending on the runner), with no new job and no SDE. UBSan stays on. Both compilers build AVX2 and AVX-512 under the job's flags and pass |
tdulcet
left a comment
There was a problem hiding this comment.
Thanks, this looks good. Just one more change is needed.
Per review: the ASan Linux job's artifact now uploads the same log list as the other jobs (primesearch#295) instead of the whole workspace, and for consistency every ASan and TSan job tees its Mlucas self-test output into test.log and uploads those logs. The steps that use the default shell gain -o pipefail, so that a sanitizer abort still fails the step through tee. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS's /bin/bash is 3.2, which has no |& (a syntax error there). Per review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the Linux ASan job building SIMD (primesearch#263), its '-s m' takes 4-9 minutes, so it stays on every run and the monthly Linux ASan job goes. macOS and Windows still build NOSIMD under ASan, where '-s m' is about half of each job, so those two keep the monthly move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the Linux ASan job building SIMD (primesearch#263), its '-s m' takes 4-9 minutes, so it stays on every run and the monthly Linux ASan job goes. macOS and Windows still build NOSIMD under ASan, where '-s m' is about half of each job, so those two keep the monthly move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m the macOS ASan job In the NOSIMD builds the medium self-test took about half of each job: 70 of 150 minutes on Windows and 45 of 95 on macOS. Windows now builds the runner's SIMD mode under the sanitizers, as the Linux ASan job does since primesearch#263, and keeps -s m. On macOS the SIMD asm does not assemble under -Og, so that job stays NOSIMD and its ladder stops at 's', as in the TSan jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Right now no job builds the hand-tuned SIMD asm under a sanitizer. Every sanitizer job is pinned to NOSIMD, because macOS cannot assemble the SIMD under
-Og(invalid CFI advance_loc expression). That pinning is correct for macOS, but on Linux it gives up the configuration that has actually caught a SIMD memory bug in this codebase: issue #12, a SEGV inradix48_dit_pass1duringMlucas -s m, was reported by AddressSanitizer on an ARM runner.This PR now also covers the x86 side, which #221 proposed as a separate job. Following the review there, that job is dropped in favour of this change to the existing job, and #221 is closed.
What it does
The
ASan-Linuxjob gets an OS axis,ubuntu-latestandubuntu-26.04-arm, and builds the runner's native SIMD mode under the same-Og -fsanitize=address,undefinedflags as before:config-fermat.shruns from a NOSIMD build, the same substitution theLinuxjob makes: ASIMD's trial-factoring routines are stubs (No TF support on ARMv8!intwopmodq80.c). The Mfactor builds stay NOSIMD on both, as before.tt t s mplus PRPtt t s.test.logand uploads the logs. The jobs that use GitHub's default shell gain-o pipefail, so that a sanitizer abort still fails the step throughtee.UBSan stays enabled alongside ASan.
Verified
x86, built from
mainwith the job's flags (-std=gnu99 -Wall -Wextra -g -Og -fsanitize=address,undefined), gcc 16.2 and clang 23:-s tt-s t-prp -s tt"Clean" means exit status 0, no Res64 errors and no ASan or UBSan reports; the AVX-512 runs confirm
Build uses AVX512. Both compilers build both modes without errors, so theasm operand has impossible constraintsfailure that once hit gcc's ASan stack instrumentation in the SIMD macros, and the duplicate asm labels under UBSan, are not a problem at-Ogon currentmain.ARM: the gcc ASIMD build under
-Og -fsanitize=address,undefinedcompiled, linked and self-tested clean on aarch64 hardware (Debian 12, gcc 12.2), and clang 14 assembled the SIMD-heaviest units (radix48_ditN_cy_dif1.c, the one from #12, and the radix-16/32 pass and wrapper files) without diagnostics. The runner's compilers are newer, so this PR's own CI run is the real check there.On #12 itself
I tried to reproduce #12 on aarch64 hardware against
main, and it does not reproduce: the reported configuration passes, including under ASan, and the-s msweep reachedM57984131at 3072K with radices 48/32/32/32 and passed it. I would not call the issue fixed on that basis (different platform, Debian/gcc vs macOS/clang, and the report says "sometimes"), but this job is what would tell us on an ongoing basis.Overlaps
-s mto the monthly workflow, and Split Linux and ASan CI into build and test jobs #363 splits this job into build and test jobs. All three conflict with this PR; whichever lands second gets rebased.CI only; no source changes.
🤖 Generated with Claude Code
Summary by CodeRabbit