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

Thread-safe in Set_Value #37

Closed
kenteltest opened this issue Sep 20, 2017 · 4 comments
Closed

Thread-safe in Set_Value #37

kenteltest opened this issue Sep 20, 2017 · 4 comments

Comments

@kenteltest
Copy link

https://github.com/Microsoft/referencesource/blob/7de0d30c7c5ef56ab60fee41fcdb50005d24979a/mscorlib/system/threading/ThreadLocal.cs#L372

If 2 threads enter this part of the code, there may be a situation where ts_finalizationHelper refers to an instance of one LinkedSlotVolatile object, and ts_slotArray refers to another instance

Although I may be wrong

@IharBury
Copy link

  1. Both those fields are thread-static
  2. This repo is not the right place to report bugs

@kenteltest
Copy link
Author

  1. Ooops. You are right
  2. For the future, where I should do it?
    Sorry

@IharBury
Copy link

Depends on the implementation which is affected by the bug. Try https://github.com/dotnet/core, for example.

@kenteltest
Copy link
Author

Thanks

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

2 participants