[3.15] gh-152635: Raise MemoryError when the lock allocation fails in _interpchannels.create() (GH-152642)#152671
Merged
Conversation
…`_interpchannels.create()` (pythonGH-152642) Previously, an allocation failure when creating the lock for a channel in `_interpchannels` would trigger an assert. Caused by `handle_channel_error` being passed an error code of -1 which is only allowed if an exception has been set. (in this case, no exception was set) `channelsmod_create` now forwards the error code from `channel_create` which `handle_channel_error` already handled. (cherry picked from commit b383aa6e1a8ea53fdeed88c71fbc34d8b2d1fde9) Co-authored-by: Steve Stagg <stestagg@gmail.com> Co-authored-by: sobolevn <mail@sobolevn.me>
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.
Previously, an allocation failure when creating
the lock for a channel in
_interpchannelswould trigger an assert.Caused by
handle_channel_errorbeing passed an error code of -1which is only allowed if an exception has been set.
(in this case, no exception was set)
channelsmod_createnow forwards the error code fromchannel_createwhich
handle_channel_erroralready handled.(cherry picked from commit b383aa6)
Co-authored-by: Steve Stagg stestagg@gmail.com
Co-authored-by: sobolevn mail@sobolevn.me
_interpchannels.create()debug aborts if channel lock allocation fails #152635