-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fuzz cairo compiled programs #1236
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c3a30e6
Create fuzzer
d85b25d
Merge branch 'main' of https://github.com/lambdaclass/cairo-rs into c…
b04e55c
Remove cli
11eaf85
Update fuzzer
dcd5e96
Change fuzzer name
406a53c
Move functions to utils; Create new fuzzer
9ddd363
Remove file and update readme
181c2b9
Change filename
06153e6
Fix filenames
5bceae7
update fuzzer and merge
dafifynn 351d6e3
delete extra changes
dafifynn 3f7cc27
delete extra changes
dafifynn 60fbefa
Move to fuzzing dir
6a4fb33
update and refactor cairo compiled programs fuzzer
dafifynn 9f0b7a8
merge with main
dafifynn 8c3d4de
fmt
dafifynn ad0310e
add cairo_programs folder
dafifynn 3c9ff7f
fix warnings
dafifynn edd9274
Merge branch 'main' into fuzz-cairo-compiled-programs
pefontana 82194e8
Merge branch 'main' into fuzz-cairo-compiled-programs
dafifynn 5e0a9fe
fix formatting
dafifynn f67aac7
add felt arbitrary
dafifynn 7a6b1ee
add felt arbitrary
dafifynn f9920f7
add info to readme
dafifynn 7da7d72
Merge branch 'main' into fuzz-cairo-compiled-programs
dafifynn 7575a1b
add fuzzer makefile command
dafifynn affab55
Merge branch 'main' into fuzz-cairo-compiled-programs
dafifynn d4de948
fix corrections
dafifynn 0b0e142
Merge branch 'main' into fuzz-cairo-compiled-programs
dafifynn d33f6ef
Merge branch 'main' into fuzz-cairo-compiled-programs
pefontana 8f75685
Merge branch 'main' into fuzz-cairo-compiled-programs
pefontana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,3 +1,12 @@ | ||
## fuzz_json | ||
This fuzzer creates a json file directly from bytes. | ||
`HFUZZ_RUN_ARGS="--dict=json.dict" cargo hfuzz run fuzz_json` | ||
|
||
## cairo_compiled_programs_fuzzer | ||
To run this fuzzer you need to be able to run cairo-compile command from the fuzzer folder beforehand. | ||
|
||
To run the fuzzer you need to have installed `cargo-fuzz`. If not, use the command `cargo +nightly install cargo-fuzz` | ||
|
||
To run simply use `cargo +nightly fuzz run --fuzz-dir . cairo_compiled_programs_fuzzer` | ||
|
||
We use nightly for this fuzzer because cargo fuzz runs with the -Z flag, which only works with +nightly. |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran
cargo +nightly install fuzz
, the execute this command and got[should i run ](error: no such command:
fuzz)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would guess it depends on
cargo-fuzz
and it needs to be installed first? In that case, we need to add it to the dependencies and document that need.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work (well, it's compiling right now at least) after running
cargo install cargo-fuzz
, FWIW.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it would be desirable to document why exactly we need to use nightly here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the command to install the tool to run this fuzzer is
cargo +nightly install cargo-fuzz
, i can add a command in the makefile to install the tool and other to run the fuzzerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the documentation and the makefile commands!