-
Notifications
You must be signed in to change notification settings - Fork 157
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1236 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 92 92
Lines 37718 37718
=======================================
Hits 36770 36770
Misses 948 948 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Benchmark Results for unmodified programs 🚀
|
0b48f0c
to
3f7cc27
Compare
Benchmark Results for modified programs 🚀
|
## cairo_compiled_programs_fuzzer | ||
To run this fuzzer you need to be inside a py_env and be able to run cairo-compile command from the fuzzer folder beforehand. | ||
|
||
To run simply use `cargo +nightly fuzz run --fuzz-dir . cairo_compiled_programs_fuzzer` |
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 fuzzer
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.
added the documentation and the makefile commands!
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.
As @pefontana and @MegaRedHand pointed out:
- There are a few fixes necessary for the docs
- We need to use the
Felt252
Arbitrary
implementation to cover more ground, since many extreme cases will never be reached byu8
oru128
.
working on it right now |
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.
Left some nits. Otherwise, LGTM
TITLE
Description
This PR adds a fuzzer that creates random cairo programs using different builtins, compile and run those programs.
Checklist