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

Use of insensitiviesMaps in UnmarshalKey causes data race #353

Open
c1pherx opened this issue May 26, 2017 · 3 comments
Open

Use of insensitiviesMaps in UnmarshalKey causes data race #353

c1pherx opened this issue May 26, 2017 · 3 comments

Comments

@c1pherx
Copy link

c1pherx commented May 26, 2017

The changes introduced in this commit cause a data race if UnmarshalKey is used in conjunction with other viper read functions such as GetString. If multiple goroutines are using combinations of UnmarshalKey and GetString (or other Get* functions) it causes panics.

@dolanor
Copy link

dolanor commented Mar 13, 2018

I can confirm that.
I'm using hyperledger/fabric-sdk-go and they use viper. And by creating multiple clients, they use the config and hit the data race with insensitiviseMap.

@sudeshrshetty
Copy link

@dolanor fabric-sdk-go has fixed this issue, it doesn't use viper.UnmarshalKey anymore.

@lnashier
Copy link

@sudeshrshetty what does it use now?

aeneasr added a commit to ory/viper that referenced this issue Jul 15, 2019
aeneasr added a commit to ory/viper that referenced this issue Jul 15, 2019
ttys3 pushed a commit to ttys3/viper that referenced this issue Aug 25, 2019
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

No branches or pull requests

4 participants