Paper record
W4240590466MemorySanitizer: Fast detector of uninitialized memory use in C++
Evgeniy Stepanov, Konstantin Serebryany
- Year
- 2015
- Venue
- Proceedings of the CGO/Proceedings of the ... CGO
- References
- 12
- Cited by
- 200
Details and counts from OpenAlex.
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.