[LLVMbugs] [Bug 11098] New: valgrind errors in PCHGenerator::HandleTranslationUnit

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 10 00:43:38 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=11098

           Summary: valgrind errors in PCHGenerator::HandleTranslationUnit
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pawel.worach at gmail.com
                CC: llvmbugs at cs.uiuc.edu


This is with trunk r141528.

******************** TEST 'Clang :: ASTMerge/exprs.c' FAILED
********************
Script:
--
/data/tmp/obj.1/Debug+Asserts/bin/clang -cc1 -emit-pch -o
/data/tmp/obj.1/tools/clang/test/ASTMerge/Output/exprs.c.tmp.1.ast
/data/tmp/llvm/tools/clang/test/ASTMerge/Inputs/exprs1.c
/data/tmp/obj.1/Debug+Asserts/bin/clang -cc1 -emit-pch -o
/data/tmp/obj.1/tools/clang/test/ASTMerge/Output/exprs.c.tmp.2.ast
/data/tmp/llvm/tools/clang/test/ASTMerge/Inputs/exprs2.c
/data/tmp/obj.1/Debug+Asserts/bin/clang -cc1 -ast-merge
/data/tmp/obj.1/tools/clang/test/ASTMerge/Output/exprs.c.tmp.1.ast -ast-merge
/data/tmp/obj.1/tools/clang/test/ASTMerge/Output/exprs.c.tmp.2.ast
-fsyntax-only -verify /data/tmp/llvm/tools/clang/test/ASTMerge/exprs.c
--
Exit Code: 123
Command Output (stderr):
--
==35607== Syscall param write(buf) points to uninitialised byte(s)
==35607==    at 0x4DD015C: __sys_write (in /lib/libc.so.7)
==35607==    by 0x28E88C1: llvm::raw_ostream::write(char const*, unsigned long)
(raw_ostream.cpp:305)
==35607==    by 0x28E8846: llvm::raw_ostream::write(char const*, unsigned long)
(raw_ostream.cpp:295)
==35607==    by 0x115AAF4:
clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&)
(GeneratePCH.cpp:55)
==35607==    by 0x12BB978: clang::ParseAST(clang::Sema&, bool)
(ParseAST.cpp:101)
==35607==    by 0x100119A: clang::ASTFrontendAction::ExecuteAction()
(FrontendAction.cpp:379)
==35607==    by 0x10012B5: clang::FrontendAction::Execute()
(FrontendAction.cpp:299)
==35607==    by 0xFE4561:
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(CompilerInstance.cpp:631)
==35607==    by 0xFB71B5:
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(ExecuteCompilerInvocation.cpp:173)
==35607==    by 0xFA80D6: cc1_main(char const**, char const**, char const*,
void*) (cc1_main.cpp:159)
==35607==    by 0xFB2BC1: main (driver.cpp:354)
==35607==  Address 0x5321a5d is 14,349 bytes inside a block of size 131,072
alloc'd
==35607==    at 0x4172F79: operator new(unsigned long) (in
/usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==35607==    by 0x113650E: __gnu_cxx::new_allocator<unsigned
char>::allocate(unsigned long, void const*) (new_allocator.h:91)
==35607==    by 0x1136544: std::_Vector_base<unsigned char,
std::allocator<unsigned char> >::_M_allocate(unsigned long) (stl_vector.h:128)
==35607==    by 0x1136678: std::vector<unsigned char, std::allocator<unsigned
char> >::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned char*,
std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char
const&) (vector.tcc:271)
==35607==    by 0x113682B: std::vector<unsigned char, std::allocator<unsigned
char> >::push_back(unsigned char const&) (stl_vector.h:605)
==35607==    by 0x11371F0: void
llvm::BitstreamWriter::EmitRecordWithAbbrevImpl<unsigned long>(unsigned int,
llvm::SmallVectorImpl<unsigned long>&, llvm::StringRef) (BitstreamWriter.h:363)
==35607==    by 0x1137508: void
llvm::BitstreamWriter::EmitRecordWithBlob<unsigned long>(unsigned int,
llvm::SmallVectorImpl<unsigned long>&, llvm::StringRef) (BitstreamWriter.h:428)
==35607==    by 0x110DF0D:
clang::ASTWriter::WriteIdentifierTable(clang::Preprocessor&, bool)
(ASTWriter.cpp:2359)
==35607==    by 0x1118357: clang::ASTWriter::WriteASTCore(clang::Sema&,
clang::MemorizeStatCalls*, llvm::StringRef, std::string const&, bool)
(ASTWriter.cpp:3020)
==35607==    by 0x1118A8D: clang::ASTWriter::WriteAST(clang::Sema&,
clang::MemorizeStatCalls*, std::string const&, bool, llvm::StringRef)
(ASTWriter.cpp:2741)
==35607==    by 0x115AAC4:
clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&)
(GeneratePCH.cpp:52)
==35607==    by 0x12BB978: clang::ParseAST(clang::Sema&, bool)
(ParseAST.cpp:101)
==35607== 
--

********************

Another valgrind error is this which looks related:
******************** TEST 'Clang :: PCH/chain-cxx.cpp' FAILED
********************Script:
--
/data/buildslave/clang-i386-freebsd-vg_leak/obj/llvm.1/Release+Asserts/bin/clang
-cc1 -fsyntax-only -verify -include
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
-include
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
/data/buildslave/clang-i386-freebsd-vg_leak/obj/llvm.1/Release+Asserts/bin/clang
-cc1 -fsyntax-only -verify
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
-chain-include
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
-chain-include
/data/buildslave/clang-i386-freebsd-vg_leak/src-llvm/tools/clang/test/PCH/chain-cxx.cpp
--
Exit Code: 123
Command Output (stderr):
--
==53519== Conditional jump or move depends on uninitialised value(s)
==53519==    at 0x1136A7D: llvm::BitstreamWriter::EmitVBR64(unsigned long,
unsigned int) (BitstreamWriter.h:147)
==53519==    by 0x1137435: void llvm::BitstreamWriter::EmitRecord<unsigned
long>(unsigned int, llvm::SmallVectorImpl<unsigned long>&, unsigned int)
(BitstreamWriter.h:402)
==53519==    by 0x114F316: clang::ASTWriter::WriteSubStmt(clang::Stmt*)
(ASTWriterStmt.cpp:1468)
==53519==    by 0x114F2E4: clang::ASTWriter::WriteSubStmt(clang::Stmt*)
(ASTWriterStmt.cpp:1466)
==53519==    by 0x114F3A5: clang::ASTWriter::FlushStmts()
(ASTWriterStmt.cpp:1477)
==53519==    by 0x11419B7: clang::ASTWriter::WriteDecl(clang::ASTContext&,
clang::Decl*) (ASTWriterDecl.cpp:1671)
==53519==    by 0x11182B2: clang::ASTWriter::WriteASTCore(clang::Sema&,
clang::MemorizeStatCalls*, llvm::StringRef, std::string const&, bool)
(ASTWriter.cpp:3012)
==53519==    by 0x1118A8D: clang::ASTWriter::WriteAST(clang::Sema&,
clang::MemorizeStatCalls*, std::string const&, bool, llvm::StringRef)
(ASTWriter.cpp:2741)
==53519==    by 0x115AAC4:
clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&)
(GeneratePCH.cpp:52)
==53519==    by 0x12BB978: clang::ParseAST(clang::Sema&, bool)
(ParseAST.cpp:101)
==53519==    by 0x11591F1:
clang::ChainedIncludesSource::create(clang::CompilerInstance&)
(ChainedIncludesSource.cpp:146)
==53519==    by 0x100237B:
clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&,
llvm::StringRef, clang::InputKind) (FrontendAction.cpp:220)
==53519== 
==53519== Conditional jump or move depends on uninitialised value(s)
==53519==    at 0x1136A4D: llvm::BitstreamWriter::EmitVBR(unsigned int,
unsigned int) (BitstreamWriter.h:138)
==53519==    by 0x1136A90: llvm::BitstreamWriter::EmitVBR64(unsigned long,
unsigned int) (BitstreamWriter.h:148)
==53519==    by 0x1137435: void llvm::BitstreamWriter::EmitRecord<unsigned
long>(unsigned int, llvm::SmallVectorImpl<unsigned long>&, unsigned int)
(BitstreamWriter.h:402)
==53519==    by 0x114F316: clang::ASTWriter::WriteSubStmt(clang::Stmt*)
(ASTWriterStmt.cpp:1468)
==53519==    by 0x114F2E4: clang::ASTWriter::WriteSubStmt(clang::Stmt*)
(ASTWriterStmt.cpp:1466)
==53519==    by 0x114F3A5: clang::ASTWriter::FlushStmts()
(ASTWriterStmt.cpp:1477)
==53519==    by 0x11419B7: clang::ASTWriter::WriteDecl(clang::ASTContext&,
clang::Decl*) (ASTWriterDecl.cpp:1671)
==53519==    by 0x11182B2: clang::ASTWriter::WriteASTCore(clang::Sema&,
clang::MemorizeStatCalls*, llvm::StringRef, std::string const&, bool)
(ASTWriter.cpp:3012)
==53519==    by 0x1118A8D: clang::ASTWriter::WriteAST(clang::Sema&,
clang::MemorizeStatCalls*, std::string const&, bool, llvm::StringRef)
(ASTWriter.cpp:2741)
==53519==    by 0x115AAC4:
clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&)
(GeneratePCH.cpp:52)
==53519==    by 0x12BB978: clang::ParseAST(clang::Sema&, bool)
(ParseAST.cpp:101)
==53519==    by 0x11591F1:
clang::ChainedIncludesSource::create(clang::CompilerInstance&)
(ChainedIncludesSource.cpp:146)
==53519==

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list