davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
197 stars 58 forks source link

Wrong refcount after PyTuple_SET_ITEM? #160

Open dvarrazzo opened 5 years ago

dvarrazzo commented 5 years ago

Checking the function https://github.com/psycopg/psycopg2/blob/b796ca0c0a03b75bf7c9212455683c1e3d520466/psycopg/cursor_type.c#L681-L726 the refcount checker reports a refcount error like the following:

image

PyTuple_SET_ITEM should have stolen a reference but it seems it didn't.