-
Notifications
You must be signed in to change notification settings - Fork 286
Trying to prevent accidental usage of the fuzztarget functions #154
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
Conversation
1f2cb92
to
30193f5
Compare
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 part i'm less sure of is the tests here, because rust tests run in concurrent threads and I want to test both with the bool set and without I had to use some Mutex to make sure they don't run together
Well it's not super elegant but it works, so it's good. This is discussed here: rust-lang/rust#43155 This issue has some nice code snippets. The simplest solution is to pass -- --test-threads=1
to cargo test
. I think we could actually do that (with a comment that explains it).
30193f5
to
cb3acfd
Compare
That's cool :) did not know about this flag. |
cb3acfd
to
cdd89ee
Compare
8e8ccfa
to
e720016
Compare
Rebased, and replaced the |
e720016
to
3698599
Compare
3698599
to
c29481e
Compare
c29481e
to
d58822e
Compare
Closing, fixed by #263 |
A suggestion of a way to solve #90
This is a result of a conversation with @real-or-random and some feedback from @TheBlueMatt
The part i'm less sure of is the tests here, because rust tests run in concurrent threads and I want to test both with the bool set and without I had to use some Mutex to make sure they don't run together
Another thing that isn't too nice is that we need to put this is all the fuzzing functions.
if proc macros were stabilized before 1.22 we could've wrote an attribute macro and made it a bit nicer but it would've still required doing it on every function.