Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_sanity() scoped mutex locked after assertion #177

Closed
lioriz opened this issue Jun 12, 2022 · 3 comments
Closed

check_sanity() scoped mutex locked after assertion #177

lioriz opened this issue Jun 12, 2022 · 3 comments

Comments

@lioriz
Copy link

lioriz commented Jun 12, 2022

In check_sanity() function,
In the scenario where multiple processes share the same shared memory, if the shared memory is corrupted for some reason then when one of the processes calls check_sanity() the scoped mutex in the function locks but the process crashes with assertion without unlocking the mutex, causing any other process that will call check_sanity() to be stuck on the locked scoped mutex.

If there is a mutex in a shared memory object it must be unlocked before assertion, exception, or return.
I would expect the check_sanity() function to return false in the case of corrupted memory instead of assert.

@lioriz lioriz changed the title check_sanity() scoped mutex lock after assertion check_sanity() scoped mutex locked after assertion Jun 13, 2022
@lioriz
Copy link
Author

lioriz commented Jun 13, 2022

opened PR 178 for this issue.

@igaztanaga
Copy link
Member

Many thanks for the PR!

igaztanaga added a commit that referenced this issue Jul 16, 2022
@lioriz
Copy link
Author

lioriz commented Jul 16, 2022

Many thanks for the PR!

My pleasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants