Repository navigation
Conversation
Unregistering a missing or already-unregistered resource jumps to stage2 while dataBufferBSTLock is still held. The call returns MA_DOES_NOT_EXIST, but subsequent resource registrations and unregisters block indefinitely. Move stage2 before the unlock so all exits from the critical section release the mutex before checking the result. Add a device-independent regression test using registered PCM data. It covers missing resources, repeated unregisters, shared registrations, and narrow/wide names for 100 rounds. Give the CTest a timeout so the original deadlock fails rather than hanging the test run indefinitely. Verified that the unpatched source times out. The patched test passes with warnings as errors, ASan/UBSan, C89, and C++11 builds.
This branch has not been deployed
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.
Fix resource manager deadlock when unregistering missing resources
Unregistering a missing or already-unregistered resource returns
MA_DOES_NOT_EXISTwhile leavingdataBufferBSTLocklocked. Subsequent resource operations then hang.Move
stage2before the unlock so all error exits release the mutex.Adds a device-independent regression test covering missing resources, repeated unregisters, shared references, and narrow/wide names.
Validation