This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Specify memory order while using atomic_compare_exchange
ClosedPublic

Authored by Chia-hungDuan on Aug 2 2023, 5:02 PM.

Details

Summary

atomic_compare_exchange was using _strong and memory_order_acquire
by default. This is not aligned with general use, for example, in C++,
the default is memory_order_seq_cst. To reduce the ambiguity, make the
version and ordering explicitly.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.Aug 2 2023, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 5:02 PM
Herald added subscribers: yaneury, Enna1. · View Herald Transcript
Chia-hungDuan requested review of this revision.Aug 2 2023, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 5:02 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cferris accepted this revision.Aug 2 2023, 5:13 PM

LGTM.

This revision is now accepted and ready to land.Aug 2 2023, 5:13 PM