Skip to content

Commit

Permalink
Add script for updating libfuzzer from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Aug 17, 2018
1 parent 86bcaac commit c8832cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ $ cargo rustc -- -C passes='sancov' -C llvm-args='-sanitizer-coverage-level=3' -
$ ./target/debug/fuzzed # runs fuzzing
```

## Updating libfuzzer from upstream

```
./update-libfuzzer.sh <llvm/compiler-rt SHA1>
```

## License

All files in `libfuzzer` directory are licensed NCSA.
Expand Down
10 changes: 10 additions & 0 deletions update-libfuzzer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -ex

project_dir="$(pwd)"
tmp_dir="$(mktemp -d)"

git clone https://github.com/llvm-mirror/compiler-rt.git "$tmp_dir"
cd "$tmp_dir"
git checkout "$1"
rm -rf "$project_dir/libfuzzer/"
mv "$tmp_dir/lib/fuzzer/" "$project_dir/libfuzzer/"

0 comments on commit c8832cc

Please sign in to comment.