================
@@ -43,6 +43,12 @@
 // RUN: %clang -fsanitize=fuzzer --target=i386-unknown-linux -stdlib=libc++ 
-static-libstdc++ %s -### 2>&1 | FileCheck --check-prefixes=CHECK-LIBCXX-STATIC 
%s
 // CHECK-LIBCXX-STATIC: "-Bstatic" "-lc++"
 
+// Check that we add required sanitizer dependencies when dynamically linking
+// the sanitizer runtime (e.g. libFuzzer uses ceilf in libm).
----------------
bjosv wrote:

`ceilf` was what I got when building without the correction. I can't find it 
either so can change to `sqrt`.
```
> cd /home/bjorn/repos/llvm-project/build/bin
> ./clang -fsanitize=fuzzer -shared-libsan -Wl,-rpath=$(dirname $(./clang 
> --print-file-name=libclang_rt.ubsan_standalone-x86_64.so)) ~/tmp/test_fuzzer.c
/usr/bin/ld: 
/home/bjorn/repos/llvm-project/build/lib/clang/22/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer.a(fuzzer.o):
 undefined reference to symbol 'ceilf@@GLIBC_2.2.5'
```

https://github.com/llvm/llvm-project/pull/164842
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to