Gcc thread sanitizer false positive only for debug info flag
I am having a problem with Gcc's thread sanitizer that I cannot find on their bugzilla or on stackoverflow so I am unsure if I am missing something or if this really is a bug. If I create a main.cpp file containing: #include <thread> int main(){ std::thread t([](){}); t.join(); return 0;} Now if I compile it using: g++-4.9.2 -std=c++1y -fsanitize=thread -fPIE -pie -o TestProgram main.cpp Running the resulting executable does not yield any problem. Yet if I add the debug info flag: g++-4.9.2 -std=c++1y -fsanitize=thread -g -fPIE -pie -o TestProgram main.cpp then the thread sanitizer detects a