prakashsellathurai ยท GitHub

Bug report

Bug description:

Parent: #146102

https://gist.github.com/devdanzin/266ca45099796a2373866a07447d5ebf

Summary

  1. ga_vectorcall (line 653): PyVectorcall_Function(alias->origin) can return NULL, immediately called as function pointer โ†’ segfault.
  2. _Py_make_parameters (line 243-245): After _PyTuple_Resize fails, parameters is NULL but Py_DECREF(parameters) is called โ†’ crash.

Fix

  1. Add NULL check and fallback to PyObject_Vectorcall.
  2. Change Py_DECREF(parameters) to Py_XDECREF(parameters) at line 245.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Read the original on github.com โ†—