Finding reference-counting errors in Python/C programs with affine analysis

20Citations
Citations of this article
11Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Python is a popular programming language that uses reference counting to manage heap objects. Python also has a Foreign Function Interface (FFI) that allows Python extension modules to be written in native code such as C and C++. Native code, however, is outside Python's system of memory management; therefore extension programmers are responsible for making sure these objects are reference counted correctly. This is an error prone process when code becomes complex. In this paper, we propose Pungi, a system that statically checks whether Python objects' reference counts are adjusted correctly in Python/C interface code. Pungi transforms Python/C interface code into affine programs with respect to our proposed abstractions of reference counts. Our system performs static analysis on transformed affine programs and reports possible reference counting errors. Our prototype implementation found over 150 errors in a set of Python/C programs. © 2014 Springer-Verlag.

Cite

CITATION STYLE

APA

Li, S., & Tan, G. (2014). Finding reference-counting errors in Python/C programs with affine analysis. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8586 LNCS, pp. 80–104). Springer Verlag. https://doi.org/10.1007/978-3-662-44202-9_4

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free