Skip to content
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

Add fuzz targets for semver. #75

Merged
merged 1 commit into from
Jun 27, 2017
Merged

Add fuzz targets for semver. #75

merged 1 commit into from
Jun 27, 2017

Conversation

frewsxcv
Copy link
Member

No description provided.

@killercup
Copy link
Member

killercup commented Jun 26, 2017

Very nice! version_req_read_write_read immediately (just 127,034 iterations 😅) found the bug you already reported. Good job at minimizing it, the base case I got was 111111111111111111.*.1.

Travis failure seems related to rustfmt-targets and not this.

r+ after rebase

Copy link
Member

@killercup killercup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Jun 27, 2017
75: Add fuzz targets for semver. r=killercup
@bors
Copy link
Contributor

bors bot commented Jun 27, 2017

Build succeeded

@bors bors bot merged commit dea4f73 into master Jun 27, 2017
@frewsxcv
Copy link
Member Author

Good job at minimizing it

FYI, there's a minimize_crash=1 <crash file name> flag for libfuzzer you can use to minimize a crash

@frewsxcv frewsxcv deleted the semver branch June 27, 2017 13:40
@killercup
Copy link
Member

Really? :O TIL

@frewsxcv
Copy link
Member Author

frewsxcv commented Jun 27, 2017

You should be able to do something like this:

diff --git a/run-fuzzer.sh b/run-fuzzer.sh
index 7e58a5f..87c337b 100755
--- a/run-fuzzer.sh
+++ b/run-fuzzer.sh
@@ -47,4 +47,5 @@ else
     exit 1
 fi
 
-cargo run --target $TARGET --bin "$2" -- ${@:3} `pwd`/corpus `pwd`/seeds
+# cargo run --target $TARGET --bin "$2" -- ${@:3} `pwd`/corpus `pwd`/seeds
+cargo run --target $TARGET --bin "$2" -- ${@:3} -minimize_crash=1 ./crash-1e14de261fd235a653f7a52c5eeed03f9dbfda80

Lemme know if you run into any issues and I can try to help

@frewsxcv
Copy link
Member Author

Also, you can see all flags with -help=1

@killercup
Copy link
Member

Very cool! I've read through -help but probably missed minimize.

Sadly I fixed all my crashes except for an OOM and it's not doing anything useful for that it seems :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants