mirror of
https://github.com/boostorg/log.git
synced 2026-01-31 08:12:30 +00:00
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.