-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This contains the results of a few days of both reproducing and fixing fuzz bugs and also hacking on the fuzzer: 1. Fixes #1203 which was a somewhat subtle budget-error-escalation bug the fuzzer found. 2. Fixes a couple other instances of that pattern. 3. Fixes a fuzzer-found instance of a frame invariant corruption. 4. Moves the machinery the fuzzer needs from tests/utils (which was guarded by `cfg(test)` so inaccessible to `testutils` and guards it with `cfg(feature="testutils")` 5. Removes the duplicate code in the fuzzer lib and instead uses host testutils 6. Extends testutils to record the storage map and then switch to enforcing, rather than manually building the enforcing map 7. Removes the other non-expr fuzz case, it's redundant. 8. Adds some scaffolding for fuzz debugging. 9. Adds support for passing arguments to the fuzzer to enable access to storage and cross-contract calls. 10. Fix the thing where we rebuild every time due to build.rs not being conservative enough
- Loading branch information
Showing
34 changed files
with
375 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub fn main() { | ||
println!("cargo:rerun-if-changed=build.rs"); | ||
crate_git_revision::init(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug fuzz artifact", | ||
"program": "${workspaceFolder}/target/x86_64-unknown-linux-gnu/debug/expr", | ||
"args": [ | ||
"-artifact_prefix=${workspaceFolder}/artifacts/expr/", | ||
"artifacts/expr/crash-7b18da95a61f3f9e45457852fd98c958d49fe603" | ||
], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
fuzz-fast-stable-no-sanitizer: | ||
cargo fuzz run expr --release --sanitizer none -j $$(nproc) | ||
|
||
fuzz-debug-stable-no-sanitizer: | ||
cargo fuzz run expr --dev --sanitizer none | ||
|
||
fuzz-slow-nightly-with-sanitizer: | ||
cargo +nightly fuzz run expr --release -j $$(nproc) | ||
|
||
clean: | ||
rm -rf target | ||
rm -rf corpus/* artifacts/* | ||
|
||
reset: | ||
rm -rf corpus/* artifacts/* |
Oops, something went wrong.