<div dir="ltr">On Fri, Aug 2, 2013 at 4:11 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 2 August 2013 05:12, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>

> Hi Rafael,<br>
><br>
> MSan reported an error after this commit, which I hopefully fixed in<br>
> r187647.<br>
> Default PPRegion ctor didn't initialize UniqueID, which could lead to weird<br>
> comparison results.<br>
> Another possible fix would be to make default UniqueID ctor initialize the<br>
> members with zeroes, but I didn't like it,<br>
> as UniqueID is essentially a pair, and zeroes might be valid values on some<br>
> platforms. Could you check if this looks fine to you?<br>
<br>
</div>It is probably OK, Thanks!<br>
<br>
Which test was failing?<br></blockquote><div><br></div><div>Failing Tests (1):<br></div><div><div>    Clang :: Index/skip-parsed-bodies/compile_commands.json</div></div><div><br></div><div><div>==20014== WARNING: MemorySanitizer: use-of-uninitialized-value</div>
<div>    #0 0x7fe51419d918 in operator== /build/llvm/include/llvm/Support/FileSystem.h:136</div><div>    #1 0x7fe51419d918 in operator== /build/llvm/tools/clang/tools/libclang/Indexing.cpp:106</div><div>    #2 0x7fe51419d918 in isParsed /build/llvm/tools/clang/tools/libclang/Indexing.cpp:192</div>
<div>    #3 0x7fe51419d918 in (anonymous namespace)::IndexingConsumer::shouldSkipFunctionBody(clang::Decl*) /build/llvm/tools/clang/tools/libclang/Indexing.cpp:385</div><div>    #4 0x7fe514fb1d7a in clang::Sema::canSkipFunctionBody(clang::Decl*) /build/llvm/tools/clang/lib/Sema/SemaDecl.cpp:9211</div>
<div>    #5 0x7fe51650873b in clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /build/llvm/tools/clang/lib/Parse/ParseStmt.cpp:2380</div><div>    #6 0x7fe516534350 in clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:458</div>
<div>    #7 0x7fe516533b31 in clang::Parser::LexedMethod::ParseLexedMethodDefs() /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:266</div><div>    #8 0x7fe5165325ae in clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:395</div>
<div>    #9 0x7fe51641fe95 in clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int, clang::Decl*) /build/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:2669</div>
<div>    #10 0x7fe5164193da in clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::Parser::ParsedAttributesWithRange&) /build/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:1596</div>
<div>    #11 0x7fe5163c20fc in clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /build/llvm/tools/clang/lib/Parse/ParseDecl.cpp:2992</div>
<div>    #12 0x7fe51638de98 in clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /build/llvm/tools/clang/lib/Parse/Parser.cpp:856</div>
<div>    #13 0x7fe51638d281 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /build/llvm/tools/clang/lib/Parse/Parser.cpp:922</div>
<div>    #14 0x7fe51638a89e in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /build/llvm/tools/clang/lib/Parse/Parser.cpp:787</div><div>    #15 0x7fe516403b36 in clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) /build/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:201</div>
<div>    #16 0x7fe516402a54 in clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) /build/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:177</div><div>    #17 0x7fe5163bd6a1 in clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) /build/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1371</div>
<div>    #18 0x7fe51638979a in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /build/llvm/tools/clang/lib/Parse/Parser.cpp:725</div><div>    #19 0x7fe516388392 in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) /build/llvm/tools/clang/lib/Parse/Parser.cpp:592</div>
<div>    #20 0x7fe516379f51 in clang::ParseAST(clang::Sema&, bool, bool) /build/llvm/tools/clang/lib/Parse/ParseAST.cpp:144</div><div>    #21 0x7fe51492c3e3 in clang::ASTFrontendAction::ExecuteAction() /build/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:475</div>
<div>    #22 0x7fe51492aed4 in clang::FrontendAction::Execute() /build/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:378</div><div>    #23 0x7fe51488990b in clang::ASTUnit::LoadFromCompilerInvocationAction(clang::CompilerInvocation*, llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine>, clang::ASTFrontendAction*, clang::ASTUnit*, bool, llvm::StringRef, bool, bool, bool, bool, bool, bool, llvm::OwningPtr<clang::ASTUnit>*) /build/llvm/tools/clang/lib/Frontend/ASTUnit.cpp:1884</div>
<div>    #24 0x7fe514199665 in clang_indexSourceFile_Impl(void*) /build/llvm/tools/clang/tools/libclang/Indexing.cpp:659</div><div>    #25 0x7fe51420c04b in llvm::CrashRecoveryContext::RunSafely(void (*)(void*), void*) /build/llvm/lib/Support/CrashRecoveryContext.cpp:315</div>
<div>    #26 0x7fe51420c56b in RunSafelyOnThread_Dispatch(void*) /build/llvm/lib/Support/CrashRecoveryContext.cpp:346</div><div>    #27 0x7fe51425dbb2 in ExecuteOnThread_Dispatch(void*) /build/llvm/lib/Support/Threading.cpp:75</div>
<div>    #28 0x7fe516e5ce99 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7e99)</div><div>    #29 0x7fe51308fccc (/lib/x86_64-linux-gnu/libc.so.6+0xf3ccc)</div><div>SUMMARY: MemorySanitizer: use-of-uninitialized-value /build/llvm/include/llvm/Support/FileSystem.h:136 operator==</div>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div>