Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang 3.7.0 memory sanitizer - uninitialized value #912

Closed
mintyc opened this issue Oct 26, 2015 · 1 comment
Closed

clang 3.7.0 memory sanitizer - uninitialized value #912

mintyc opened this issue Oct 26, 2015 · 1 comment

Comments

@mintyc
Copy link

mintyc commented Oct 26, 2015

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.

@haberman
Copy link
Member

According to #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.

adellahlou pushed a commit to adellahlou/protobuf that referenced this issue Apr 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants