Skip to content

Commit 8276afc

Browse files
committed
ci(test): build windows-11-arm with the native ARM64 toolchain (CLANGARM64)
windows-11-arm is an ARM64 runner but the test matrix built it with the x86-64 msys2 environment (CLANG64), so the binary ran under Windows-on-ARM x86-64 emulation. AddressSanitizer's function interception cannot patch the emulated system DLLs there (interception_win: unhandled instruction -> asan_malloc_win.cpp CHECK failed), crashing in ASan init before any test ran. That was being hidden behind optional:true. Pin each Windows leg's msys2 environment + package arch to the RUNNER architecture: x86-64 runners use CLANG64 (mingw-w64-clang-x86_64-*), the ARM64 runner uses CLANGARM64 (mingw-w64-clang-aarch64-*). The windows-11-arm binary is now native ARM64, so ASan instruments native code and the leg is a real, non-optional gate (matching smoke.yml, which already uses CLANGARM64 for it). Every other matrix leg already used a toolchain matching its runner arch. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 0731052 commit 8276afc

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

‎.github/workflows/_test.yml‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,17 @@ jobs:
4343
{"os":"ubuntu-22.04-arm","cc":"gcc","cxx":"g++","optional":true},
4444
{"os":"macos-15","cc":"cc","cxx":"c++","optional":true}
4545
]'
46-
CORE_WIN='[{"os":"windows-latest"}]'
47-
BROAD_WIN='[{"os":"windows-2025","optional":true},{"os":"windows-11-arm","optional":true}]'
46+
# Each Windows leg pins the msys2 environment + package arch to the
47+
# RUNNER architecture so the build is native, never emulated:
48+
# x86-64 runners -> CLANG64 (mingw-w64-clang-x86_64-*)
49+
# ARM64 runner -> CLANGARM64 (mingw-w64-clang-aarch64-*)
50+
# windows-11-arm previously used the x86-64 CLANG64 toolchain, so its
51+
# binary ran under Windows-on-ARM x86-64 emulation and ASan's function
52+
# interception crashed (interception_win: unhandled instruction). With
53+
# the native ARM64 toolchain ASan instruments native ARM64 code, so it
54+
# is a real (non-optional) gate, not a tolerated emulated-flake.
55+
CORE_WIN='[{"os":"windows-latest","msystem":"CLANG64","pkg":"x86_64"}]'
56+
BROAD_WIN='[{"os":"windows-2025","optional":true,"msystem":"CLANG64","pkg":"x86_64"},{"os":"windows-11-arm","msystem":"CLANGARM64","pkg":"aarch64"}]'
4857
if [ "$BROAD" = "true" ]; then
4958
UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
5059
WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b')
@@ -90,12 +99,12 @@ jobs:
9099

91100
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
92101
with:
93-
msystem: CLANG64
102+
msystem: ${{ matrix.msystem }}
94103
path-type: inherit
95104
install: >-
96-
mingw-w64-clang-x86_64-clang
97-
mingw-w64-clang-x86_64-compiler-rt
98-
mingw-w64-clang-x86_64-zlib
105+
mingw-w64-clang-${{ matrix.pkg }}-clang
106+
mingw-w64-clang-${{ matrix.pkg }}-compiler-rt
107+
mingw-w64-clang-${{ matrix.pkg }}-zlib
99108
make
100109
git
101110

0 commit comments

Comments
 (0)