Skip to content

Revisit lock-free ThreadLocalStorage storage management #542

@jonwis

Description

@jonwis

https://github.com/microsoft/wil/blob/master/include/wil/result.h#L403-L430

Internal analysis suggests that this sequence is not entirely thread safe. Some options include:

  • Use an srwlock-per-bucket (costs a function call)
  • Figure out the right sequence of acquire/release semantics for reading the hashtable bucket entries' starting pointer
  • Spin gently (using the platform's "yield" instructions as necessary)
  • Deeper analysis to prove safety with annotations and documentation

Thanks to @sudhakar-vp-zz and @cpkleynhans for the analysis! (See OS PR#13582094)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions