As of commit 7cd150fe609b606f259af18fc98d34b4fbde20a7, the
gcc-with-cpychecker harness now invokes the reference-count checker,
removing the need to hack up libcpychecker/__init__.py to do this.
So now you can invoke the checker on arbitrary CPython extension code
(e.g. gdb) with something like:
make CC=/path/to/built/plugin/gcc-with-cpychecker
without having to hack up the checker's code: you'll get a GCC with the
extra "cpychecker" compilation pass, which runs these tests:
* format checking of Py_ArgParse* and Py_BuildValue calls
* reference count analysis
Having said that, expect to run into tracebacks and other bugs with the
checker if you do (including incorrect reports - so proceed with
caution!). I'm still slowly working through gdb and the plugin's code
with the checker, fixing issues as I see them.
Adding some kind of custom attributes to mark functions that steal
references (and those that return borrowed references) is probably next.
Dave
Show replies by date