Success Stories¶
If you use the gcc python plugin to improve your code, we’d love to hear about it.
If you want to share a success story here, please email the plugin’s mailing list.
The GNU Debugger¶
Bugs found in gdb by compiling it with the plugin’s gcc-with-cpychecker script:
- http://sourceware.org/bugzilla/show_bug.cgi?id=13308
- http://sourceware.org/bugzilla/show_bug.cgi?id=13309
- http://sourceware.org/bugzilla/show_bug.cgi?id=13310
- http://sourceware.org/bugzilla/show_bug.cgi?id=13316
- http://sourceware.org/ml/gdb-patches/2011-06/msg00376.html
- http://sourceware.org/ml/gdb-patches/2011-10/msg00391.html
- http://sourceware.org/bugzilla/show_bug.cgi?id=13331
Tom Tromey also wrote specialized Python scripts to use the GCC plugin to locate bugs within GDB.
One of his scripts analyzes gdb’s resource-management code, which found some resource leaks and a possible crasher:
The other generates a whole-program call-graph, annotated with information on gdb’s own exception-handling mechanism. A script then finds places where these exceptions were not properly integrated with gdb’s embedded Python support:
LibreOffice¶
Stephan Bergmann wrote a script to analyze LibreOffice’s source code, detecting a particular usage pattern of C++ method calls:
psycopg¶
Daniele Varrazzo used the plugin’s gcc-with-cpychecker script on psycopg, the popular Python interface to PostgreSQL, and was able to find and fix numerous subtle errors:
pycups¶
Bugs found in the Python bindings for the CUPS API by compiling it with the plugin’s gcc-with-cpychecker script:
python-krbV¶
Bug found in the Python bindings for the Kerberos 5 API by compiling it with the plugin’s gcc-with-cpychecker script:
Bugs found in itself¶
Bugs found and fixed in the gcc Python plugin itself, by running the the plugin’s gcc-with-cpychecker script when compiling another copy:
- various reference counting errors:
- http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=a9f48fac24a66c77007d99bf23f2eab188eb909e
- http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=2922ad81c8e0ea954d462433ecc83d86d9ebab68
- http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=4642a564e03c9e2c8114bca206205ad9c8fbc308>
- bad format string: https://fedorahosted.org/pipermail/gcc-python-plugin/2011-August/000065.html
- minor const-correctness error: http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=4fe4a83288e04be35a96d0bfec332197fb32c358