summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusunixfiledescriptor.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-07-02 07:53:27 +0200
committerMarc Mutz <[email protected]>2025-07-03 00:33:31 +0200
commitd4757de5de3e151d129e8d272ad3b3d27172cfde (patch)
treefef141d7d93df24c84fbe3fdb35812d2440452e9 /src/dbus/qdbusunixfiledescriptor.cpp
parent057929359d7aa554bebfeaad70f1242573b6a6b0 (diff)
QtTest LoggerRegistry: fix UB (insufficient atomic memory order)
The code load()s the shared `loggers` to iterate over it (or copy from it) (= read the memory pointed to) and it store()s the shared `loggers` after intializing it (= writing to the memory pointed to). So relaxed loads and stores are not sufficient here. Stores must have release memory order and loads acquire memory order, otherwise the writes before the store() will not happen-before the reads after the load(), which is a data race, which is UB. The fact that the pointer is a shared_ptr doesn't change that. Amends a0303cc7c590ff17fb5b0a5975bff98669e42942. Pick-to: 6.10 6.9 6.8 Change-Id: I8f82e5db240efdd414983f5b1cb0e1c1f1861100 Reviewed-by: Tim Blechmann <[email protected]> Reviewed-by: David Faure <[email protected]>
Diffstat (limited to 'src/dbus/qdbusunixfiledescriptor.cpp')
0 files changed, 0 insertions, 0 deletions