Skip to content

Conversation

steveharter
Copy link
Contributor

These locks were ported from .NET Framework which did a security check within each lock, but those checks weren't ported over so the lock doesn't do anything special anymore.

Found by CodeQL.

@steveharter steveharter added this to the 10.0.0 milestone Apr 24, 2025
@steveharter steveharter requested a review from ericstj April 24, 2025 18:50
@steveharter steveharter self-assigned this Apr 24, 2025
@Copilot Copilot AI review requested due to automatic review settings April 24, 2025 18:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes unnecessary lock(this) statements in the CategoryName and MachineName property setters to eliminate redundant synchronization that no longer provides additional security checks.

  • Removed lock blocks in property setters
  • Cleaned up related comments

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-performancecounter
See info in area-owners.md if you want to be subscribed.

@ericstj
Copy link
Member

ericstj commented Apr 29, 2025

/ba-g filed an issue for the 1 failure that was not known, but other known failures from this few-day old build have been fixed and are now appearing not known since BA doesn't consider build date / issue close date when evaluating known issues.

@ericstj ericstj merged commit ebe1414 into dotnet:main Apr 29, 2025
81 of 86 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2025
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.

3 participants