-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 go fuzzer in preparation for testing. #630
Conversation
} | ||
switch v.Kind() { | ||
case reflect.Map: | ||
v.Set(reflect.MakeMap(v.Type())) |
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.
Is there any need to try nil maps or slices randomly with this?
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.
Good idea. Pointers, too.
Implemented @smarterclayton's suggestion plus a few more things I turned out to need. |
See #571 for a usage of this. I'm thinking about trying to move this into a separate project and using it as a dependency. It's not 100% full featured yet, but I think it would still be widely useful. Thoughts? |
Makes sense - was going to suggest it. |
Responding to some @smarterclayton comments that got lost when I pushed-- I'll add a TODO to add reproducible randomness to this. Will require more changes so best left to a future PR. |
That's fine with me. Wondered where that comment went... :) |
Yeah, if you leave comments on the revision instead of the PR they go away when I rebase/squash. |
Hopefully ready to go now. |
LGTM |
Add go fuzzer in preparation for testing.
pointers that reference addresses of the internal circular buffer should not escape
fix(docs): Fix typo and command reference
backend/hostgw: Fix memory leak
Also gofmt a few files that needed it.
Upcoming is a PR that uses this to make sure our api.Encode/Decode actually work.