Wiedemann O, Sieh V (2025)
Publication Type: Conference contribution
Publication year: 2025
Publisher: Association for Computing Machinery, Inc
Pages Range: 18-24
Conference Proceedings Title: PLOS 2025 - Proceedings of the 13th Workshop on Programming Languages and Operating Systems
ISBN: 9798400722257
Using reference counting is a popular approach when working with dynamically allocated memory in C programs to improve the memory safety properties of a system. As C has no facilities to insert the required reference counting operations automatically, the programmer remains responsible for inserting them at the appropriate places. Relying on humans for this task continues to be error-prone, as missing or duplicated operations can lead to memory leaks or use-after-free anomalies. To aid the programmer in handling reference-counted objects correctly, we propose a static analyzer that detects inconsistent reference counters and potential use-after-free anomalies. Our approach does not use conventions or heuristics for its analysis; instead, we introduced source code annotations that codify the intended behavior of functions. The analysis was implemented as part of the FAUCCC static analyzer and is used to check the source code of the JITTY operating system. Only 220 function annotations were required for a code base of 180k lines of C code. Additional annotations on function parameters, non-local variables, and struct members enable the use-after-free anomaly detection.
APA:
Wiedemann, O., & Sieh, V. (2025). Static Analysis of Reference-Counted Objects for the C Programming Language. In PLOS 2025 - Proceedings of the 13th Workshop on Programming Languages and Operating Systems (pp. 18-24). Seoul, KR: Association for Computing Machinery, Inc.
MLA:
Wiedemann, Ole, and Volkmar Sieh. "Static Analysis of Reference-Counted Objects for the C Programming Language." Proceedings of the 13th Workshop on Programming Languages and Operating Systems, PLOS 2025, Seoul Association for Computing Machinery, Inc, 2025. 18-24.
BibTeX: Download