Session Abstract

Uninitialized memory can cause unpredict behavior and be hard to reproduce. Also Race conditions are among the most insidious and elusive programming errors. They typically cause erratic and mysterious failures, often long after the code has been deployed to production. Developers need to pay a lot of effort on testing and write code with care. Golang provides runtime tools for detecting those issues.

MemorySanitizer is a dynamic detector of uninitialized memory(UUM) in C and C++. The tool is based on compile time instrumentation and relies on bitprecise shadow memory at run-time. Shadow propagation technique is used to avoid false positive reports on copying of uninitialized memory. Also it’s a part of LLVM trunk and implemented as an LLVM optimization pass.

ThreadSanitizer is a dynamic detector of data races, implemented by hybrid algorithm(based on happens-befor and locksets) and is a part of compiler-rt in LLVM.

In this presentation I will share
1, What are MemorySanitizer and ThreadSanitizer
2, The algorithms of the two detectors
3, The relationship between them and LLVM
4, How to port them into Golang on arm64
5, The example used in Golang

Session Speakers

Fangming Fang

senior software engineer (Arm)

Work on Golang for enabling arm port, performance optimization etc.