Skip to content
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

Panic due to nil maps #3042

Merged
merged 2 commits into from
Feb 19, 2019
Merged

Conversation

srfrog
Copy link
Contributor

@srfrog srfrog commented Feb 19, 2019

A couple of missing map initializations in varValue were causing panic when those fields were being accessed from fillVars().

Closes #3041


This change is Reviewable

srfrog added 2 commits February 19, 2019 12:14
varValue assignments were missing map initialization for Vars
field causing panic when accessed later in fillVars().
@srfrog srfrog requested a review from a team February 19, 2019 19:19
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Once it passes all tests, let's get it merged. And then cherry-pick in release/v1.0 branch.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@srfrog srfrog merged commit bce2393 into master Feb 19, 2019
@srfrog srfrog deleted the srfrog/issue-3401_query_panic_assignment_nil_map branch February 19, 2019 20:16
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
* query/query.go: var assignment was missing map init

varValue assignments were missing map initialization for Vars
field causing panic when accessed later in fillVars().

* query/query0_test.go: added tests that found the bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants