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

Fix concurrent consumers issue with ReactMarker #38710

Closed
wants to merge 1 commit into from

Conversation

ryancat
Copy link
Contributor

@ryancat ryancat commented Jul 31, 2023

Summary:
Fix a race condition when multiple consumers try to access ReactMarker and trigger calls to native module. Even though ReactMarker uses ConcurrentLinkedQueue, the loop itself could race and cause NPE.

Changelog:
[Android][Fixed] - Fix race condition with ReactMarker calls to its native module

Differential Revision: D47933993

@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 fb-exported labels Jul 31, 2023
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Jul 31, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,890,113 +52
android hermes armeabi-v7a 7,938,120 +47
android hermes x86 9,287,773 +53
android hermes x86_64 9,189,430 +49
android jsc arm64-v8a 9,478,037 -36
android jsc armeabi-v7a 8,419,043 -43
android jsc x86 9,461,836 -42
android jsc x86_64 9,776,210 -35

Base commit: 4b84a2b
Branch: main

Summary:
Pull Request resolved: facebook#38710

Fix a race condition when multiple consumers try to access ReactMarker and trigger calls to native module. Even though ReactMarker uses `ConcurrentLinkedQueue`, the loop itself could race and cause NPE.

Changelog:
[Android][Fixed] - Fix race condition with ReactMarker calls to its native module

Reviewed By: rshest

Differential Revision: D47933993

fbshipit-source-id: 502fa95b69aae07444bf48a5f30c094750abed25
@facebook-github-bot
Copy link
Contributor

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

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

This pull request was successfully merged by Xin Chen in 6ab062d.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Aug 1, 2023
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