Memory Sanitizer
问题 I am playing around with Memory Sanitizer with Clang 3.7.0 on Ubuntu 14.04. The following code does work perfectly: #include <cstdio> int main() { double ans; printf("Hello World: %f\n", ans); return 0; } when compiled with clang++ -g -O1 -fsanitize=memory -fsanitize-memory-track-origins=2 -fomit-frame-pointer sanitize.cpp -o sanitize I was expecting an error. Doesn't Memory Sanitizer catch the fact that ans was not initialized? Thanks for your help. 回答1: From the clang santitizer