Skip to content

Commit b4b8c35

Browse files
hanno-beckermkannwischer
authored andcommitted
CI: Build macOS FIPS202 sanitizer tests with clang 22
The macos-latest label has migrated to the macOS 26 (Tahoe) arm64 image, whose default-toolchain ASan runtime (nixpkgs clang 21.x) deadlocks at process startup: compiler-rt's shadow-memory init re-enters the uninitialized allocator. This made the macOS sanitizer jobs hang until the 6h job timeout, intermittently, depending on which image a matrix leg landed on. Same symptom as python/cpython#145199. The fix landed upstream in LLVM >= 22 (llvm/llvm-project#191039, backported as #192082). Build the macOS aarch64 target with clang 22 via the existing 'clang22' dev shell so it can run on macos-latest again: - backend_tests: switch nix-shell from 'ci' to 'clang22'. - build_kat: set the macos-latest target's nix_shell to 'clang22', and pass nix-shell to the sanitizer step uniformly with the other steps (it previously omitted nix-shell and fell back to the action default). Other targets (Linux native gcc, macos-15-intel) are unchanged. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 2d1cc90 commit b4b8c35

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ jobs:
1818
name: 'macOS (aarch64)'
1919
arch: mac
2020
mode: native
21-
nix_shell: ci
21+
# macos-latest is now the macOS 26 (Tahoe) image, whose clang 21
22+
# ASan runtime deadlocks at process startup (see backend_tests).
23+
# Build this target with clang 22, which carries the compiler-rt
24+
# fix (llvm/llvm-project#191039, backport #192082).
25+
nix_shell: clang22
2226
- runner: macos-15-intel
2327
name: 'macOS (x86_64)'
2428
arch: mac
@@ -114,6 +118,7 @@ jobs:
114118
uses: ./.github/actions/multi-functest
115119
if: ${{ matrix.target.mode == 'native' }}
116120
with:
121+
nix-shell: ${{ matrix.target.nix_shell }}
117122
gh_token: ${{ secrets.GITHUB_TOKEN }}
118123
compile_mode: native
119124
cflags: "-DMLKEM_DEBUG -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
@@ -186,7 +191,12 @@ jobs:
186191
- name: build + test
187192
uses: ./.github/actions/multi-functest
188193
with:
189-
nix-shell: 'ci'
194+
# clang 22 shell: the default `ci` shell's clang 21 ASan runtime
195+
# deadlocks at process startup on the macos-latest / macOS 26 (Tahoe)
196+
# image (compiler-rt shadow-memory init; same symptom as
197+
# python/cpython#145199), fixed in LLVM >= 22 by
198+
# llvm/llvm-project#191039 (backport #192082).
199+
nix-shell: 'clang22'
190200
nix-cache: 'false'
191201
gh_token: ${{ secrets.GITHUB_TOKEN }}
192202
compile_mode: 'native'

0 commit comments

Comments
 (0)