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

Potential Race Condition found by InferSharp static analysis tool #280

Open
udlose opened this issue Dec 28, 2022 · 0 comments
Open

Potential Race Condition found by InferSharp static analysis tool #280

udlose opened this issue Dec 28, 2022 · 0 comments

Comments

@udlose
Copy link
Contributor

udlose commented Dec 28, 2022

I am using AWSXRayRecorder v2.13.0 in my .NET 7 API. I am using the new Microsoft Static Analysis Tool (InferSharp) to analyze my code as well as dependent packages and I found a warning about a potential race condition:

#0
/_/sdk/src/Core/Internal/Entities/Entity.cs:493: warning: Thread Safety Violation
Read/Write race. Non-private method Entity.AddSubsegment(...) indirectly reads without synchronization from this.Amazon.XRay.Recorder.Core.Internal.Entities.Entity.<IsInProgress>k__BackingField. Potentially races with write in method Entity.set_IsInProgress(...).
Reporting because this access may occur on a background thread.

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

1 participant