davidmalcolm / gcc-python-plugin

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

False positive with PyArg_UnpackTuple seen analyzing postgresql #73

Open davidmalcolm opened 7 years ago

davidmalcolm commented 7 years ago

http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-18/postgresql-9.1.2-2.fc17/postgresql-9.1.2/src/pl/plpython/plpython.c.PLy_output-refcount-errors.html#report-1

davidmalcolm commented 7 years ago

Imported from trac issue 33. Created by dmalcolm on 2012-02-18T11:09:07, last modified: 2012-05-07T13:45:18

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-05-07 13:45:18:

The false positive here is that the checker is considering the case {{{ when PyArg_UnpackTuple() fails }}} whereas that's not possible: the code already checked: {{{ if (PyTuple_Size(args) == 1) }}} above, so with that guard, PyArg_UnpackTuple can't fail.