MemDefender: An Allocation Monitoring and Memory Leak Injection Tool for Java Memory leaks are one of the major causes of software aging. Despite of Garbage Collection, such leaks are also prevalent in Java applications. Consequently, a lot of sophisticated approaches for memory leak detection in Java have been proposed in the last two decades. Unfortunately, it is difficult to compare and evaluate them as it is challenging and cumbersome to find suitable datasets for evaluation purposes. A further handicap for effective research is a high effort of collecting certain types of statistics on memory usage which have proved to be effective for memory leak detection. In this paper we propose MemDefender, a tool for facilitating studies on automated memory leak detection in Java. Our tool serves two purposes: it can inject leaks into arbitrary Java applications in flexible ways, facilitating evaluation and comparison of new approaches. As a second function it provides statistics on number and size of allocated objects during application execution, also grouped by GC generations. These statistics can serve as building blocks for developing new leak detection techniques.

SPrinter: A Static Checker for Finding Smart Pointer Errors in C Programs Smart pointers are widely used to prevent memory errors in modern C code. However, improper usage of smart pointers may also lead to common memory errors, which makes the code not as safe as expected. To avoid smart pointer errors as early as possible, we present a coding style checker to detect possible bad smart pointer usages during compile time, and notify programmers about bugprone behaviors. The evaluation indicates that the currently available stateoftheart static code checkers can only detect 25 out of 116 manually inserted errors, while our tool can detect all these errors. And we also found 521 bugs among 8 open source projects with only 4 false positives.