mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 08:46:49 +02:00
Fix macOS fuzz: explicitly link LLVM libc++ to avoid weak-def symbol error
The fuzz targets were crashing on macOS 14 with: dyld: weak-def symbol not found '__ZnwmSt19__type_descriptor_t' libFuzzer compiled with LLVM 18 uses typed allocation ABI symbols not present in macOS 14's system libc++. Since DYLD_LIBRARY_PATH cannot override SIP-protected /usr/lib/libc++.1.dylib at runtime, we fix this at link time: - -nostdlib++: suppress implicit system libc++ linking - -L$LLVM/lib/c++ -lc++: explicitly link LLVM's libc++ (which has the symbol) - -Wl,-rpath,$LLVM/lib/c++: embed rpath so dyld finds LLVM's libc++ at runtime Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1b53b942e0
commit
b93a669224
1 changed files with 1 additions and 1 deletions
2
.github/workflows/fuzz.yaml
vendored
2
.github/workflows/fuzz.yaml
vendored
|
|
@ -73,7 +73,7 @@ jobs:
|
||||||
LLVM=/opt/homebrew/opt/llvm@18
|
LLVM=/opt/homebrew/opt/llvm@18
|
||||||
make -C tests/fuzz all \
|
make -C tests/fuzz all \
|
||||||
FUZZ_CC=$LLVM/bin/clang \
|
FUZZ_CC=$LLVM/bin/clang \
|
||||||
FUZZ_LDFLAGS="-Wl,-ld_classic"
|
FUZZ_LDFLAGS="-Wl,-ld_classic -nostdlib++ -L$LLVM/lib/c++ -lc++ -Wl,-rpath,$LLVM/lib/c++"
|
||||||
- name: Run fuzz targets
|
- name: Run fuzz targets
|
||||||
env:
|
env:
|
||||||
DYLD_LIBRARY_PATH: "/opt/homebrew/opt/llvm@18/lib/c++:${{ env.DYLD_LIBRARY_PATH }}"
|
DYLD_LIBRARY_PATH: "/opt/homebrew/opt/llvm@18/lib/c++:${{ env.DYLD_LIBRARY_PATH }}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue