fix: 修复 DSysInfo 在 AArch64 架构下的线程安全问题 #540
Merged
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.
在 AArch64 弱内存模型下,DSysInfoPrivate 的多个 ensure* 函数由于缺乏
互斥锁保护,在多线程并发访问时(如应用商店后台服务)会导致以下问题:
本修改通过在 DSysInfoPrivate 中引入 QMutex,确保了单例初始化过程的原子性
和内存可见性。
Log: 修复 AArch64 架构下 DSysInfo 随机触发 SIGBUS/SIGSEGV 崩溃的问题。
Bug: https://pms.uniontech.com/bug-view-350151.html
Change-Id: Ib23b078c3eef5c3ad8aef5a36035ac4839d11bb2