fix: add acquire fence in bthread_join for ARM memory visibility#3276
Open
guoliushui wants to merge 2 commits intoapache:masterfrom
Open
fix: add acquire fence in bthread_join for ARM memory visibility#3276guoliushui wants to merge 2 commits intoapache:masterfrom
guoliushui wants to merge 2 commits intoapache:masterfrom
Conversation
Ensure memory visibility on ARM architecture after thread join.
Author
|
已使用测试程序验证生效 |
There was a problem hiding this comment.
Pull request overview
This PR addresses weak-memory-ordering visibility issues where bthread_join() may return before the joining thread can reliably observe the joined bthread’s prior memory writes (reported on ARM/aarch64).
Changes:
- Add an acquire fence after
TaskGroup::join()observes the joined bthread has advancedversion_butex. - Gate the fence with ARM architecture preprocessor checks (
__aarch64__/__arm__).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
这是来自QQ邮箱的假期自动回复邮件。
您好,来信我已收到,暂时无法亲自回复您的邮件。
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ensure memory visibility on ARM architecture after thread join.
What problem does this PR solve?
Issue Number: fix #3274
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects:
Breaking backward compatibility:
Check List: