2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-31 08:12:30 +00:00
Files
log/src/posix
Andrey Semashev 24117c7a0c Fixed a race in reliable_message_queue::open_or_create on POSIX systems.
The open_or_create implementation assumed that the created shared memory
size of 0 meant that the shared memory segment was freshly created. This
is not the case if multiple threads call open_or_create and check the
segment size before one of them resizes it. This could result in
initializing the shared memory multiple times and even corrupting it
if other threads were sending or receiving messages in the mean time.

While at it, converted the use of atomics in shared memory to ipc_atomic.

Fixes https://github.com/boostorg/log/issues/162.
2021-09-15 16:33:25 +03:00
..