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

data race on ipv6_works #915

Closed
bprodoehl opened this issue Jul 14, 2016 · 3 comments
Closed

data race on ipv6_works #915

bprodoehl opened this issue Jul 14, 2016 · 3 comments

Comments

@bprodoehl
Copy link
Contributor

I did this

I ran a multi-threaded app that uses libcurl under Clang 3.9 ThreadSanitizer.

I expected the following

Clean operation.

curl/libcurl version

7.44

operating system

Ubuntu 14.04, x86_64.

I encountered a data race with two threads calling Curl_ipv6works() at the same time. I think perhaps the call to Curl_ipv6works() should be moved into curl_global_init() to avoid this.

@bagder
Copy link
Member

bagder commented Jul 14, 2016

Sounds like an excellent suggestion to me. You up to providing such a change as a pull request?

@bprodoehl
Copy link
Contributor Author

Sure thing. I should be able to put that together and test it tonight.

jay pushed a commit that referenced this issue Jul 18, 2016
- Curl_ipv6works() is not thread-safe until after the first call, so
call it once during global init to avoid a possible race condition.

Bug: #915
PR: #918
@jay
Copy link
Member

jay commented Jul 18, 2016

Thanks, landed in c509808.

@jay jay closed this as completed Jul 18, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants