Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
795a5b2c
Commit
795a5b2c
authored
Feb 15, 2020
by
lhchavez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuzzers: Fix the documentation
Some of the commands are now out of date.
parent
ee3307a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
docs/fuzzing.md
+7
-6
No files found.
docs/fuzzing.md
View file @
795a5b2c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
libgit2 is currently using
[
libFuzzer
](
https://libfuzzer.info
)
to perform
libgit2 is currently using
[
libFuzzer
](
https://libfuzzer.info
)
to perform
automated fuzz testing. libFuzzer only works with clang.
automated fuzz testing. libFuzzer only works with clang.
## Prerequisites
**
for building fuzz targets:
## Prerequisites for building fuzz targets:
1.
All the prerequisites for
[
building libgit2
](
https://github.com/libgit2/libgit2
)
.
1.
All the prerequisites for
[
building libgit2
](
https://github.com/libgit2/libgit2
)
.
2.
A recent version of clang. 6.0 is preferred.
[
pre-build Debian/Ubuntu
2.
A recent version of clang. 6.0 is preferred.
[
pre-build Debian/Ubuntu
...
@@ -27,14 +27,15 @@ automated fuzz testing. libFuzzer only works with clang.
...
@@ -27,14 +27,15 @@ automated fuzz testing. libFuzzer only works with clang.
## Run the fuzz targets
## Run the fuzz targets
1.
`ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolize
-6.0
1.
`ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolize
LSAN_OPTIONS=allocator_may_return_null=1
LSAN_OPTIONS=allocator_may_return_null=1
ASAN_OPTIONS=allocator_may_return_null=1 ./build/fuzz
/fuzz_packfile_raw
ASAN_OPTIONS=allocator_may_return_null=1 ./build/fuzz
ers/packfile_fuzzer
fuzz
/corpora/fuzz_packfile_raw
/`
fuzz
ers/corpora/packfile
/`
The
`LSAN_OPTIONS`
and
`ASAN_OPTIONS`
are there to allow
`malloc(3)`
to return
The
`LSAN_OPTIONS`
and
`ASAN_OPTIONS`
are there to allow
`malloc(3)`
to return
`NULL`
. The
`LLVM_PROFILE_FILE`
is there to override the path where libFuzzer
`NULL`
, which is expected if a huge chunk of memory is allocated. The
will write the coverage report.
`LLVM_PROFILE_FILE`
environment string can also be added to override the path
where libFuzzer will write the coverage report.
## Get coverage
## Get coverage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment