Skip to content

Fix use-after-free in AsyncEventBeat#43618

Closed
tnovak wants to merge 1 commit into
facebook:mainfrom
tnovak:export-D55226529
Closed

Fix use-after-free in AsyncEventBeat#43618
tnovak wants to merge 1 commit into
facebook:mainfrom
tnovak:export-D55226529

Conversation

@tnovak

@tnovak tnovak commented Mar 22, 2024

Copy link
Copy Markdown
Contributor

Summary:
Both common and Android implementations of AsyncEventBeat use weak_ptrs
to determine if the object is still valid before invoking the callback.
Move the write to isBeatCallbackScheduled_ down so it's protected by
that same check.

Changelog: [Internal]

Reviewed By: javache, NickGerleman

Differential Revision: D55226529

Summary:
Both common and Android implementations of AsyncEventBeat use weak_ptrs
to determine if the object is still valid before invoking the callback.
Move the write to `isBeatCallbackScheduled_` down so it's protected by
that same check.

Changelog: [Internal]

Reviewed By: javache, NickGerleman

Differential Revision: D55226529
@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 Mar 22, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@analysis-bot

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 18,171,500 -1
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,540,605 +11
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: ad9f0b0
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 26, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 00725fa.

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