google / google/atheris

Installation doesn't work with clang 15

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
portability
Dominant language
Python
Stars
1.7k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

First it fails to find libFuzzer because libFuzzer's new location is `clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a`
Even after passing this as LIBFUZZER_LIB, there's another failure compiling (I think because a replace in setup.py fails):
```
...
/usr/bin/ld: /tmp/tmp.K7iUCoxQjJ/sanitizer.a(fuzzer_no_main.o): in function `__sanitizer_cov_8bit_counters_init': [72/1984]
(.text.__sanitizer_cov_8bit_counters_init+0x0): multiple definition of `__sanitizer_cov_8bit_counters_init'; /usr/local/lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a(fuzzer_no_ma
in.o):(.text.__sanitizer_cov_8bit_counters_init+0x0): first defined here
/usr/bin/ld: /tmp/tmp.K7iUCoxQjJ/sanitizer.a(fuzzer_no_main.o): in function `__sanitizer_weak_hook_strcasestr':
(.text.__sanitizer_weak_hook_strcasestr+0x0): multiple definition of `__sanitizer_weak_hook_strcasestr'; /usr/local/lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a(fuzzer_no_main.o
):(.text.__sanitizer_weak_hook_strcasestr+0x0): first defined here
/usr/bin/ld: /tmp/tmp.K7iUCoxQjJ/sanitizer.a(fuzzer_no_main.o): in function `__sanitizer_cov_trace_cmp4':
(.text.__sanitizer_cov_trace_cmp4+0x0): multiple definition of `__sanitizer_cov_trace_cmp4'; /usr/local/lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a(fuzzer_no_main.o):(.text.__s
anitizer_cov_trace_cmp4+0x0): first defined here
/usr/bin/ld: /tmp/tmp.K7iUCoxQjJ/sanitizer.a(fuzzer_no_main.o): in function `LLVMFuzzerRunDriver':
(.text.LLVMFuzzerRunDriver+0x0): multiple definition of `LLVMFuzzerRunDriver'; /usr/local/lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a(fuzzer_no_main.o):(.text.LLVMFuzzerRunDriv
er+0x0): first defined here
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
Command '['/tmp/pip-req-build-57t5_brl/setup_utils/merge_libfuzzer_sanitizer.sh', '/usr/local/lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a', '/usr/local/lib/clang/15.0.0/lib/x86
_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a', 'ubsan_init_standalone_preinit.cc.o ubsan_init_standalone_preinit.cpp.o']' returned non-zero exit status 1
```

To reproduce you can install atheris in this docker image: gcr.io/oss-fuzz-base/base-builder-testing-roll-clang

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.