From e4b1e264b580e350d3a2f7c4e5bdf2d19a0708e4 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Tue, 3 Mar 2026 10:44:39 -0800 Subject: [PATCH] Fix macOS fuzz: use Xcode clang instead of Homebrew LLVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Homebrew LLVM 18's ASAN/libFuzzer runtimes contain weak-def symbols for typed allocation operators (__ZnwmSt19__type_descriptor_t) that don't exist in macOS 14's system libc++. Since the symbol is embedded in the pre-built runtime dylibs (not our code), link-time flags cannot fix it. Switch to Apple's Xcode clang which ships its own libFuzzer and ASAN runtime built against the system libc++ — no ABI mismatch possible. No Homebrew LLVM install needed. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/fuzz.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fuzz.yaml b/.github/workflows/fuzz.yaml index 72c0192..d07cf7d 100644 --- a/.github/workflows/fuzz.yaml +++ b/.github/workflows/fuzz.yaml @@ -63,20 +63,17 @@ jobs: runs-on: macos-14 steps: - uses: actions/checkout@v4 - - name: Install LLVM 18 - run: brew install llvm@18 + # Use Apple's Xcode clang (avoids Homebrew LLVM libc++ ABI issues + # with __ZnwmSt19__type_descriptor_t on macOS 14). - run: ./scripts/vendor.sh - name: Generate sqlite-vec.h run: make sqlite-vec.h - name: Build fuzz targets run: | - LLVM=/opt/homebrew/opt/llvm@18 make -C tests/fuzz all \ - FUZZ_CC=$LLVM/bin/clang \ - FUZZ_LDFLAGS="-Wl,-ld_classic -nostdlib++ -L$LLVM/lib/c++ -lc++ -Wl,-rpath,$LLVM/lib/c++" + FUZZ_CC=$(xcrun -f clang) \ + FUZZ_LDFLAGS="" - name: Run fuzz targets - env: - DYLD_LIBRARY_PATH: "/opt/homebrew/opt/llvm@18/lib/c++:${{ env.DYLD_LIBRARY_PATH }}" run: | DURATION=${{ github.event.inputs.duration || '60' }} EXIT_CODE=0