作者: David L. Heine , Monica S. Lam
关键词:
摘要: This paper presents a static analysis tool that can automatically find memory leaks and deletions of dangling pointers in large C C++ applications.We have developed type system to formalize practical ownership model management. In this model, every object is pointed by one only owning pointer, which holds the exclusive right obligation either delete or transfer another pointer. addition, pointer-typed class member field required always never own its pointee at public method boundaries. Programs satisfying do not leak same more than once.We also flow-sensitive context-sensitive algorithm infer likely interfaces methods program. It identifies statements inconsistent with as sources potential double deletes. The sound respect subset language it will report all possible errors. useful those warnings correspond errors helps user understand reported showing them assumed interfaces.Our techniques are validated an implementation we call Clouseau. We applied Clouseau suite applications: two web servers, chat client, secure shell tools, executable manipulation compiler. found total 134 serious these applications. analyzes over 50K lines code about 9 minutes on 2 GHz Pentium 4 machine 70K just minute.