clang 3.7.0 memory sanitizer - uninitialized value
using clang 3.7.0 with gcc 4.8.3's stdlibc++ on Centos 7 with 3.0.0-beta-1 export CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" then build and run tests Gives a traced Warning of use of uninitialized value...
StaticDescriptorInitializer_google_2fprotobuf_2fany_2eproto constructor()
calls AddDesc...
stack down to
SimpleDescriptorDatabase::DescriptorIndex<>AddFile() - this function has comments to read....
in descriptor_database.cc
// We must be careful here -- calling file.package() if file.has_package() is
// false could access an uninitialized static-storage variable if we are being
// run at startup time.
uininitialized value reported down through AddSymbol() to ValidateSymbolName()
Sanitizer stops at the first problem, so there may be others.
According to https://github.com/google/protobuf/issues/1099 protobuf is msan-clean, and errors are likely due to a misbuilt/misconfigured libstdc++. I also just ran msan against our protobuf test suite internally and it was clean.