On Fri, Aug 2, 2013 at 4:11 PM, Rafael EspĂndola <[email protected] > wrote:
> On 2 August 2013 05:12, Alexey Samsonov <[email protected]> wrote: > > Hi Rafael, > > > > MSan reported an error after this commit, which I hopefully fixed in > > r187647. > > Default PPRegion ctor didn't initialize UniqueID, which could lead to > weird > > comparison results. > > Another possible fix would be to make default UniqueID ctor initialize > the > > members with zeroes, but I didn't like it, > > as UniqueID is essentially a pair, and zeroes might be valid values on > some > > platforms. Could you check if this looks fine to you? > > It is probably OK, Thanks! > > Which test was failing? > Failing Tests (1): Clang :: Index/skip-parsed-bodies/compile_commands.json ==20014== WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7fe51419d918 in operator== /build/llvm/include/llvm/Support/FileSystem.h:136 #1 0x7fe51419d918 in operator== /build/llvm/tools/clang/tools/libclang/Indexing.cpp:106 #2 0x7fe51419d918 in isParsed /build/llvm/tools/clang/tools/libclang/Indexing.cpp:192 #3 0x7fe51419d918 in (anonymous namespace)::IndexingConsumer::shouldSkipFunctionBody(clang::Decl*) /build/llvm/tools/clang/tools/libclang/Indexing.cpp:385 #4 0x7fe514fb1d7a in clang::Sema::canSkipFunctionBody(clang::Decl*) /build/llvm/tools/clang/lib/Sema/SemaDecl.cpp:9211 #5 0x7fe51650873b in clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /build/llvm/tools/clang/lib/Parse/ParseStmt.cpp:2380 #6 0x7fe516534350 in clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:458 #7 0x7fe516533b31 in clang::Parser::LexedMethod::ParseLexedMethodDefs() /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:266 #8 0x7fe5165325ae in clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) /build/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp:395 #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 #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 #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 #12 0x7fe51638de98 in clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /build/llvm/tools/clang/lib/Parse/Parser.cpp:856 #13 0x7fe51638d281 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /build/llvm/tools/clang/lib/Parse/Parser.cpp:922 #14 0x7fe51638a89e in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /build/llvm/tools/clang/lib/Parse/Parser.cpp:787 #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 #16 0x7fe516402a54 in clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) /build/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:177 #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 #18 0x7fe51638979a in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /build/llvm/tools/clang/lib/Parse/Parser.cpp:725 #19 0x7fe516388392 in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) /build/llvm/tools/clang/lib/Parse/Parser.cpp:592 #20 0x7fe516379f51 in clang::ParseAST(clang::Sema&, bool, bool) /build/llvm/tools/clang/lib/Parse/ParseAST.cpp:144 #21 0x7fe51492c3e3 in clang::ASTFrontendAction::ExecuteAction() /build/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:475 #22 0x7fe51492aed4 in clang::FrontendAction::Execute() /build/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:378 #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 #24 0x7fe514199665 in clang_indexSourceFile_Impl(void*) /build/llvm/tools/clang/tools/libclang/Indexing.cpp:659 #25 0x7fe51420c04b in llvm::CrashRecoveryContext::RunSafely(void (*)(void*), void*) /build/llvm/lib/Support/CrashRecoveryContext.cpp:315 #26 0x7fe51420c56b in RunSafelyOnThread_Dispatch(void*) /build/llvm/lib/Support/CrashRecoveryContext.cpp:346 #27 0x7fe51425dbb2 in ExecuteOnThread_Dispatch(void*) /build/llvm/lib/Support/Threading.cpp:75 #28 0x7fe516e5ce99 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7e99) #29 0x7fe51308fccc (/lib/x86_64-linux-gnu/libc.so.6+0xf3ccc) SUMMARY: MemorySanitizer: use-of-uninitialized-value /build/llvm/include/llvm/Support/FileSystem.h:136 operator== > > Cheers, > Rafael > -- Alexey Samsonov, MSK
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
