Skip to content

Instantly share code, notes, and snippets.

View efric's full-sized avatar

Eric Feng efric

  • New York, New York
View GitHub Profile
@efric
efric / gsoc2023.md
Last active September 10, 2023 20:12
GSoC 2023: GCC static analyzer plugin for CPython extension modules

Google Summer of Code 2023

Project Description

One crucial use case of the gcc-python plugin was its role in supporting cpychecker, a static analysis tool for CPython extension module code. Cpychecker's primary purpose was to assist programmers writing extensions in identifying common coding mistakes. The gcc-python-plugin has bitrotted over the years and, in particular, cpychecker became non-functional in some of the later GCC releases. The main objective of this project was to reintroduce the features of cpychecker, but as a GCC static analyzer plugin.

Contributions

While my initial proposal outlined several areas of interest, my mentor, David Malcolm, and I collectively chose to concentrate on the reference count checking feature of the project. We believed this would be the most beneficial to extension module developers. Briefly, the reference count for PyObject* objects in CPython re