boostorg / boostorg/interprocess
Incompatible shared memory emulation strategies (Windows)
- Dominant language
- C++
- Stars
- 185
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
### Info
Boost version: 1.89.0
Platform: Windows (x64)
Compiler: MSVC 14.3 (Visual Studio 2022)
### Description
Boost.Interprocess uses a boot timestamp to construct unique per-boot shared memory file paths (via `create_shared_dir_cleaning_old_and_get_filepath` and related helpers). On each call, it also cleans up all shared folders that do not match the current boot timestamp. On Windows, the boot timestamp can be obtained through different strategies that return different values for the same boot session.
### Impact
- applications that link against the same Boost.Interprocess version but use different strategies for getting the boot timestamp will clean up each others shared memory emulation folder
- same for applications that link against different versions of Boost.Interprocess, since the default changed between versions
### Suggested fix
- standardize on a single reliable mechanism (if even possible) and deprecate all other strategies
- add a fallback/search mechanism that checks all possible locations for the current boot session
- exclude all possible locations for the current boot session from the cleanup in `create_shared_dir_cleaning_old_and_get_filepath`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.