Title :
MemorySanitizer: Fast detector of uninitialized memory use in C++
Author :
Stepanov, Evgeniy ; Serebryany, Konstantin
Abstract :
This paper presents MemorySanitizer, a dynamic tool that detects uses of uninitialized memory in C and C++. The tool is based on compile time instrumentation and relies on bit-precise shadow memory at run-time. Shadow propagation technique is used to avoid false positive reports on copying of uninitialized memory. MemorySanitizer finds bugs at a modest cost of 2.5× in execution time and 2× in memory usage; the tool has an optional origin tracking mode that provides better reports with moderate extra overhead. The reports with origins are more detailed compared to reports from other similar tools; such reports contain names of local variables and the entire history of the uninitialized memory including intermediate stores. In this paper we share our experience in deploying the tool at a large scale and demonstrate the benefits of compile-time instrumentation over dynamic binary instrumentation.
Keywords :
C++ language; computerised instrumentation; storage management; C++; MemorySanitizer; Shadow propagation technique; compile time instrumentation; dynamic binary instrumentation; optional origin tracking mode; uninitialized memory use fast detector; Computer bugs; Detectors; Google; Instruction sets; Instruments; Optimization; Vectors;
Conference_Titel :
Code Generation and Optimization (CGO), 2015 IEEE/ACM International Symposium on
Conference_Location :
San Francisco, CA
DOI :
10.1109/CGO.2015.7054186