Skip to content

Conversation

@stephentoub
Copy link
Member

@stephentoub stephentoub commented Dec 10, 2021

If two threads race to initialize it, one may end up overwriting the other's, which means state pushed onto the losing thread's stack might end up disappearing.

Fixes #50480

If two threads race to initialize it, one may end up overwriting the others, which means state pushed onto the losing thread's stack might end up disappearing.
@ghost
Copy link

ghost commented Dec 10, 2021

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti, @safern
See info in area-owners.md if you want to be subscribed.

Issue Details

If two threads race to initialize it, one may end up overwriting the others, which means state pushed onto the losing thread's stack might end up disappearing.

Fixes #50480

Author: stephentoub
Assignees: -
Labels:

area-System.Diagnostics.Tracing

Milestone: -

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stephentoub
Copy link
Member Author

Thanks, @safern

@stephentoub stephentoub merged commit db6d2bc into dotnet:main Dec 10, 2021
@stephentoub stephentoub deleted the fixtclazyinit branch December 10, 2021 20:28
@ghost ghost locked as resolved and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Diagnostics.CorrelationManager is not thread-safe

2 participants