-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
I am not sure if this is a false-positive or not, but here's the warning:
It happens on all GitHub PRs right now, example: https://github.com/python/cpython/pull/101600/files
Looks like it is the result of c67b005
🤔
Looks like it is not a false positive:
(void)_PyCrossInterpreterData_UnregisterClass(state->ChannelIDType);
usesstate
- But, we can go to
error
, beforestate
is initialized. For example, here:if (exceptions_init(mod) != 0) { goto error; }
Moreover, _PyCrossInterpreterData_UnregisterClass(state->ChannelIDType)
might get NULL
, because of this code:
state->ChannelIDType = add_new_type(
mod, &ChannelIDType_spec, _channelid_shared);
if (state->ChannelIDType == NULL) {
goto error;
}
I am not sure that I understand this code.
When state->ChannelIDType
is not NULL
during error:
? Why is _PyCrossInterpreterData_UnregisterClass(state->ChannelIDType)
needed?
Linked PRs
Metadata
Metadata
Assignees
Labels
topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done