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

Fix data race in decodeStruct #213

Merged
merged 1 commit into from
Oct 17, 2017
Merged

Conversation

magiconair
Copy link
Contributor

@magiconair magiconair commented Sep 26, 2017

Using *reflect.StructField as map key results in a data race. I honestly
do not understand why yet and can only reproduce this in the consul
codebase with high concurrency but this patch fixes it.

The same problem also exists in mitchellh/mapstructure.

See mitchellh/mapstructure#101

Using *reflect.StructField as map key results in a data race. I honestly
do not understand why yet and can only reproduce this in the consul
codebase with high concurrency but this patch fixes it.

The same problem also exists in mitchellh/mapstructure.
magiconair added a commit to hashicorp/consul that referenced this pull request Sep 26, 2017
@mitchellh mitchellh merged commit aaf0695 into master Oct 17, 2017
@mitchellh mitchellh deleted the fix-decodeStruct-data-race branch October 17, 2017 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants