8000 gh-111178: fix some USAN failures by picnixz · Pull Request #123004 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111178: fix some USAN failures #123004

8000
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

Merged
merged 4 commits into from
Sep 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make MemoryError_dealloc compatible with destructor
  • Loading branch information
picnixz committed Aug 14, 2024
commit cc28b384da5be07ece194b8b3dce1072e6241a66
5 changes: 3 additions & 2 deletions Objects/exceptions.c
8E48
Original file line number Diff line number Diff line change
Expand Up @@ -3387,8 +3387,9 @@ _PyErr_NoMemory(PyThreadState *tstate)
}

static void
MemoryError_dealloc(PyBaseExceptionObject *self)
MemoryError_dealloc(PyObject *obj)
{
PyBaseExceptionObject *self = (PyBaseExceptionObject *)obj;
_PyObject_GC_UNTRACK(self);

BaseException_clear(self);
Expand Down Expand Up @@ -3447,7 +3448,7 @@ PyTypeObject _PyExc_MemoryError = {
PyVarObject_HEAD_INIT(NULL, 0)
"MemoryError",
sizeof(PyBaseExceptionObject),
0, (destructor)MemoryError_dealloc, 0, 0, 0, 0, 0, 0, 0,
0, MemoryError_dealloc, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
PyDoc_STR("Out of memory."), (traverseproc)BaseException_traverse,
Expand Down
Loading
0