The major features in this release are:

  • gcc 4.9 compatibility
  • a major revamping to the HTML output from gcc-with-cpychecker

New dependency: lxml. The new HTML output format uses lxml internally.

Changes to the GCC Python Plugin

GCC 4.9 compatibility

This release of the plugin adds support for gcc 4.9 (along with continued support for gcc 4.6, 4.7 and gcc 4.8).

Building against 4.9 requires a GCC 4.9 with the fix for GCC bug 63410 applied.

Other fixes

  • fixed a build-time incompatibility with Python 3.3.0
  • various internal bug fixes:
  • improvements to Makefile
  • improvements to documentation
  • add gcc.Location.in_system_header attribute

Improvements to gcc-with-cpychecker

The major improvement to gcc-with-cpychecker is a big revamp of the output.

A new “v2” HTML report is available, written to SOURCE_NAME.v2.html e.g. demo.c.v2.html:

screenshot of the new kind of HTML report

The new HTML report is easier to read in the presence of complicated control flow. It also include links to the API documentation for calls made to the CPython API.

For both old-style and new-style reports, the wording of the messages has been clarified:

  • Reference-count tracking messages now largely eliminate the 0 + N where N >= gobbledegook, since this was confusing to everyone (including me). Instead, error reports talk about references as owned vs borrowed references e.g.

    • “refs: 1 owned”
    • “refs: 0 owned 1 borrowed”

    resorting to ranges:

    refs: 0 owned + B borrowed where 1 <= B <= 0x80000000

    only where necessary.

  • Reports now add memory leak: and future use-after-free: prefixes where appropriate, to better indicate the issue.

  • Objects are referred to more in terms the user is likely to understand e.g. *dictA rather than PyDictObject.

The checker also reports better source locations in its messages e.g. in the presence of multiple return statements (https://fedorahosted.org/gcc-python-plugin/ticket/58).

Other improvements


Thanks to Buck Golemon, Denis Efremov, Philip Herron, and Tom Tromey for their contributions to this release.