[LLVMbugs] [Bug 14282] New: crash when reading a gch file produced by an older clang

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 7 10:04:16 PST 2012


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

             Bug #: 14282
           Summary: crash when reading a gch file produced by an older
                    clang
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


I accidentally didn't delete a gch file when switching my chromium checkout
from clang r 165787 to r167488.

When building a file that used a gch file `-include-pch
obj/third_party/WebKit/Source/WebCore/webcore_platform.WebCorePrefix.h-mm.gch`,
I got this crash:

Assertion failed: (begin() + idx < end()), function operator[], file
/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/include/llvm/ADT/SmallVector.h,
line 139.
0  clang             0x00000001016d4b45 PrintStackTrace(void*) + 37
1  clang             0x00000001016d4f54 SignalHandler(int) + 564
2  libsystem_c.dylib 0x00007fff9257c8ea _sigtramp + 26
3  libsystem_c.dylib 0x00007fff5fbf7f60 _sigtramp + 18446744072860710544
4  clang             0x000000010004faf6 abort + 22
5  clang             0x000000010004fad1 __assert_rtn + 81
6  clang             0x0000000100143bad
clang::ASTReader::ReadASTBlock(clang::serialization::ModuleFile&) + 18733
7  clang             0x00000001001458af clang::ASTReader::ReadAST(std::string
const&, clang::serialization::ModuleKind, unsigned int) + 191
8  clang             0x000000010009227f
clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef,
std::string const&, bool, bool, clang::Preprocessor&, clang::ASTContext&,
void*, bool) + 223
9  clang             0x00000001000920f4
clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, bool,
bool, void*) + 148
10 clang             0x00000001000b26d7
clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&,
clang::FrontendInputFile const&) + 3767
11 clang             0x0000000100094461
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 929
12 clang             0x000000010005a61a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3450
13 clang             0x0000000100052c48 cc1_main(char const**, char const**,
char const*, void*) + 840
14 clang             0x0000000100056e75 main + 3077
15 clang             0x00000001000528d4 start + 52
16 clang             0x00000000000002f1 start + 18446744069414246993


I thought gch files should have a version header to just error out in this
case?

(Sorry, no reduced repro)

-- 
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