Be strict about shared memory lifetime#308
Merged
RemiSoummer merged 4 commits intodevelopfrom May 30, 2025
Merged
Conversation
5f65834 to
359fe50
Compare
359fe50 to
20e4a8a
Compare
Collaborator
|
Installed on HiCAT PC and the test is passing |
9e90f19 to
df5bebb
Compare
Collaborator
Author
Did you mean to approve or comment? |
On Windows, do not allow Create() to open an existing shared memory block.
df5bebb to
a7543f2
Compare
Collaborator
|
I meant to comment, working on it now |
Collaborator
|
also tested ok on MacOS. |
RemiSoummer
approved these changes
May 30, 2025
Collaborator
RemiSoummer
left a comment
There was a problem hiding this comment.
looks good and working ok on Mac OS and windows.
I'm working on adding a few tests but will do in another PR to avoid delaying
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
This PR requires #272 to be merged before.
This replaces #112.
This PR is to explicitly prohibit creating a new shared memory object with a certain ID, when one already exists. This is not allowed on Linux/MacOS but was allowed on Windows until now (due to me not correctly checking the error output). This PR performs stricter error checks. Simultaneously, all error values are now checked and the exceptions now contain text containing the exact error that was encountered rather than a generic message.