Static Local Resource Checker for C functions
Published: 20.11.2013
Authors: Mednikov A.V., Krishchenko V.A.
Published in issue: #6(18)/2013
DOI: 10.18698/2308-6033-2013-6-1098
Category: Information technology
If a resource identifier is stored only in some local variable, this resource should be released before function returns, otherwise it will be released only on process termination. Any resource release should fit resource identifier storage life cycle. An algorithm for checking C language resource identifier life cycle using CFG analysis is proposed. It detects resource leaks for local resources, double release attempts, using after release and other errors. A program implementation uses a CFG created by GCC.