-
Notifications
You must be signed in to change notification settings - Fork 843
nil panic in FieldsOnCorrectTypeRule #148
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
Comments
Actually, after looking at that "correct" type check that I linked closer, it is wrong as well, as the type asserted value is not nil checked. |
Hello @titanous, do you mind sharing your setup for go-fuzz? I would like to run it for my fork. |
Sure: https://github.com/titanous/graphql-fuzz Please contribute back any additions to the corpus or other changes that are effective! The current corpus was built over about 1 billion execs, initially seeded with a couple queries and a dump of all strings quoted in backticks from the graphql codebase (random graphql queries, but there is also some random Go code and other stuff because I didn't do any filtering). |
I'm fuzzing the graphql parser with go-fuzz, and I found an issue that I'm not sure about the best option to fix.
This test panics:
The problem is subtle, the nil check of the
ParentType
doesn't take into account that nil can be typed, in this case it is a(*Object)(nil)
. I noticed that there is a properly implemented check for a nilComposite
in the codebase already. Should that be turned into a function? Is it likely that this bug exists elsewhere? If so is there a good strategy for eliminating it entirely?I'm just getting started with this codebase, so I'm not sure what the best strategy to check for and eliminate this problem entirely is.
The text was updated successfully, but these errors were encountered: