Static analysis of Python extension modules using GCC

E
Type:
Talk
Audience level:
Experienced
Category:
Python Internals
March 9th 3:20 p.m. – 4:05 p.m.

Description

Want to analyse C/C++ code using Python? I've written a plugin for GCC that embeds Python inside the compiler, allowing you to write new C/C++ compilation passes in Python. I've used this to build a static analysis tool that understands the CPython extension API, and can automatically detect reference-counting bugs, and other errors.

Abstract

I've written a plugin for GCC that embeds Python inside the compiler, allowing you to write new C/C++ compilation passes in Python.

I've used this to build a static analysis tool that understands the CPython extension API, and can automatically detect various errors (e.g. reference counting mistakes).

I'll be talking about how to use the GCC plugin to analyse C and C++ code with Python scripts, and giving a guided tour of the static analysis tool on some real-world Python extension modules.