8000 `MethodDescriptor2_new` does not check for `NULL` in `_testcapi` · Issue #121791 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
MethodDescriptor2_new does not check for NULL in _testcapi #121791
Closed
@sobolevn

Description

@sobolevn

Bug report

Here:

static PyObject *
MethodDescriptor2_new(PyTypeObject* type, PyObject* args, PyObject *kw)
{
MethodDescriptor2Object *op = PyObject_New(MethodDescriptor2Object, type);
op->base.vectorcall = NULL;
op->vectorcall = MethodDescriptor_vectorcall;
return (PyObject *)op;
}

I know that memory errors are very unluckily, but still: why not having a correct code?

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0