AFLplusplus / AFLplusplus/LibAFL
libafl_libfuzzer fails to build with error: 'sanitizer/allocator_interface.h' file not found
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 481
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 16
Description
I am trying to use the libafl_libfuzzer shim with cargo-fuzz and hitting this error:
```
--- stderr
src/sanitizer_interfaces.h:1:10: fatal error: 'sanitizer/allocator_interface.h' file not found
thread 'main' panicked at /root/.cargo/git/checkouts/libafl-c33dc6f5ec2f7a70/2c676f0/libafl_targets/build.rs:237:14:
Couldn't generate the sanitizer headers!: ClangDiagnostic("src/sanitizer_interfaces.h:1:10: fatal error: 'sanitizer/allocator_interface.h' file not found\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
thread 'main' panicked at /root/.cargo/git/checkouts/libafl-c33dc6f5ec2f7a70/2c676f0/libafl_libfuzzer/build.rs:137:5:
Couldn't build runtime crate! Did you remember to use nightly? (`rustup default nightly` to install)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to build fuzz script: RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-pc-table -Cllvm-args=-sanitizer-coverage-trace-compares --cfg fuzzing -Clink-dead-code -Cllvm-args=-sanitizer-coverage-stack-depth -Cdebug-assertions -C codegen-units=1" "cargo" "build" "--manifest-path" "/root/fuzz/fuzz/Cargo.toml" "--target" "x86_64-unknown-linux-gnu" "--release" "--config" "profile.release.debug=true" "--bin" "fuzz_target1"
```
As I have not been able to find any info on this error elsewhere, I'd appreciate any help. I am using `rustc 1.83.0-nightly (c52c23b6f 2024-09-16)` and running on an X86_64 Ubuntu server
Contributor guide
Assessment
This issue has not been assessed yet.