Closed
Description
Bug report
Bug description:
The documentation is clear that it is size_t
However if you search the Python source for nargs
, it is often Py_ssize_t
One is signed and the other is unsigned. It looks like argument clinic is one culprit.
Ordinarily this is no big deal, because it would take too many arguments to overflow. However the clang undefined behaviour sanitizer gets upset when the sign on that parameter is wrong. See #111178 for why that matters.
I discovered this because I had copied argument clinic using Py_ssize_t
and then hit ubsan issues.
CPython versions tested on:
3.14
Operating systems tested on:
Linux