oss-fuzz
oss-fuzz copied to clipboard
[WIP] Add `nix` to the projects (with Ubuntu packages)
:warning: This is a Work-In-Progress that does not even work (yet?) :warning:
As I am struggling to integrate nix to OSS-fuzz, these PR (with google/oss-fuzz#6317) helps to keep track of the progress, and help gather feedback on approaches taken.
Context
As part of a fellowship, I work on fuzzing nix; More details on https://discourse.nixos.org/t/tweag-fellowship-fuzzing-nix-0 .
One of the "end-goal" of the project is to integrate nix to OSS-fuzz; This PR is a step in that direction.
Approach
Unlike google/oss-fuzz#6317 ;
This approach aims to stay close to OSS-fuzz's philosophy:
- use Docker for build-time reproducibility
- compile the fuzzers statically While still:
- leverage upstream's autotools system:
- build
nixlibraries without hassle - add compilation of fuzz target
- add extra flags to libraries (relies on nixos/nix#5175) for better fuzzer coverage and sanitization
- build
Disadvantage: Doesn't work (yet); Dockerfile and build.sh are non trivial and will be a pain to maintain.
TODO
- [ ] :warning: correct the runtime
SEGFAULT... - [x] apply sanitizers to libraries
- [ ] don't clone a fork:
- [ ] integrate fuzz targets upstream
- [ ] integrate
local.mkupstream
- [ ] compile and test coverage binary(ies)
- [ ] add
auto_ccstoprojects.yamlif maintainers are OK - [x] sign the google-cla thing
cc @regnat
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.
What to do if you already signed the CLA
Individual signers
- It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
- Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
- The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
- The email used to register you as an authorized contributor must also be attached to your GitHub account.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!