-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade libfuzzer for LLVM 6.0 #30
Conversation
This updates the CI tests with flags that are currently used by the cargo-fuzz to give better confidence about stuff working properly.
When I built my first version of rustc with llvm6 I forgot to enable the sanitizers in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for looking into this @nagisa, i really appreciate it 🙇
i just confirmed that libfuzzer-sys
doesn't work with the latest nightlies (w/ llvm 6), and then specified this branch in my cargo.toml and everything works again! so here's a ✅
bors r+ |
30: Upgrade libfuzzer for LLVM 6.0 r=frewsxcv a=nagisa This PR pulls in the changes to libfuzzer, at commit llvm-mirror/compiler-rt@cc0ab3f. My observation is that this works just fine with current state of affairs. That is, given a: ``` $ rustc -Cllvm-args=-version LLVM (http://llvm.org/): LLVM version 6.0.0 Optimized build. Default target: x86_64-unknown-linux-gnu Host CPU: znver1 ``` The following command, when run within the both of the `example` folders in this repository work "just" fine (should also be confirmed by the CI), which somewhat counteracts observations made in #29, that libfuzzer cannot work with sanitizers anymore (quite the contrary, it seems that sanitizers are still required). ``` cargo rustc --release -- -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-trace-compares -Cpanic=abort -Cllvm-args=-sanitizer-coverage-trace-divs -Cllvm-args=-sanitizer-coverage-trace-geps -Cllvm-args=-sanitizer-coverage-prune-blocks=0 -Zsanitizer=address ``` If I remember correctly, cargo-fuzz generates fuzz targets with this git repository as a dependency. This means that all these fuzz targets will possibly break for people using older compilers once we upgrade, however not upgrading libfuzzer-sys will(?) break people using the new nightly. While our compatibility story is, I believe, that we support only the current nightly without any real back or forward compatibility, this might be a good time to think about how we want to go about our versioning and release flow. Perhaps we’ll be able to find some way that does not break everybody’s fuzz targets every time LLVMup happens. Fixes https://github.com/rust-fuzz/libfuzzer-sys/issues/29 r? @frewsxcv or @Manishearth cc @PaulGrandperrin
Build succeeded |
This PR pulls in the changes to libfuzzer, at commit llvm-mirror/compiler-rt@cc0ab3f.
My observation is that this works just fine with current state of affairs. That is, given a:
The following command, when run within the both of the
example
folders in this repository work "just" fine (should also be confirmed by the CI), which somewhat counteracts observations made in #29, that libfuzzer cannot work with sanitizers anymore (quite the contrary, it seems that sanitizers are still required).If I remember correctly, cargo-fuzz generates fuzz targets with this git repository as a dependency. This means that all these fuzz targets will possibly break for people using older compilers once we upgrade, however not upgrading libfuzzer-sys will(?) break people using the new nightly.
While our compatibility story is, I believe, that we support only the current nightly without any real back or forward compatibility, this might be a good time to think about how we want to go about our versioning and release flow. Perhaps we’ll be able to find some way that does not break everybody’s fuzz targets every time LLVMup happens.
Fixes https://github.com/rust-fuzz/libfuzzer-sys/issues/29
r? @frewsxcv or @Manishearth
cc @PaulGrandperrin