Skip to content

Fix data race in TraceSection.h#48774

Closed
christophpurrer wants to merge 1 commit into
facebook:mainfrom
christophpurrer:export-D68366837
Closed

Fix data race in TraceSection.h#48774
christophpurrer wants to merge 1 commit into
facebook:mainfrom
christophpurrer:export-D68366837

Conversation

@christophpurrer
Copy link
Copy Markdown
Contributor

Summary:
[Changelog] [Internal] - Fix data race in TraceSection.h

Issue

The instrumentsLogHandle variable is a static variable that is initialized lazily when the getOrCreateInstrumentsLogHandle() function is called. However, this initialization is not thread-safe. Multiple threads may call this function simultaneously, leading to a data race on the instrumentsLogHandle variable.

Differential Revision: D68366837

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jan 18, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68366837

Summary:

[Changelog] [Internal] - Fix data race in TraceSection.h

## Issue
The `instrumentsLogHandle` variable is a static variable that is initialized lazily when the `getOrCreateInstrumentsLogHandle()` function is called. However, this initialization is not thread-safe. Multiple threads may call this function simultaneously, leading to a data race on the `instrumentsLogHandle` variable.

Differential Revision: D68366837
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68366837

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 22, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in d154cd5.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @christophpurrer in d154cd5

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants