Files
sdk/runtime
Alexander Markov a677c369d9 [vm] Use atomics when accessing patchable object pool entries
Although the data races on patchable object pool entries are benign,
without proper release-acquire ordering there is no happens-before
relationship between store and load and there is a data race as defined
by the C++ standard (and detected by TSAN), which is an undefined
behavior.

It seems like additional memory_order_acquire loads only happen in
runtime entries when we need to patch calls, which is rather
infrequent. Unless additional barriers measurably affect
performance, we should prefer to avoid UB.

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/62236

Change-Id: I3a4d8c3dca7ce1ee1a75efd1ea8ba4e9c06c9dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476500
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2026-01-29 13:18:24 -08:00
..
2026-01-27 09:14:39 -08:00