[LLVMbugs] [Bug 12617] New: assertion failed in textdiagnostic.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 22 00:29:24 PDT 2012


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

             Bug #: 12617
           Summary: assertion failed in textdiagnostic.cpp
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8422
  --> http://llvm.org/bugs/attachment.cgi?id=8422
a.o file

$ clang -x c a.o
a.o:1:1: error: expected identifier or '('
clang: TextDiagnostic.cpp:257: int SourceColumnMap::byteToColumn(int) const:
Assertion `0<=n && n<static_cast<int>(m_byteToColumn.size())' failed.
0  clang           0x000000000296c7a6
1  clang           0x000000000296c5a2
2  libpthread.so.0 0x00007f78584d6030
3  libc.so.6       0x00007f78577cf475 gsignal + 53
4  libc.so.6       0x00007f78577d26f0 abort + 384
5  libc.so.6       0x00007f78577c8621 __assert_fail + 241
6  clang           0x0000000000d27909
7  clang           0x0000000000d23fb0
8  clang           0x0000000000d25db1
clang::TextDiagnostic::emitSnippetAndCaret(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>) + 1333
9  clang           0x0000000000d2756d
10 clang           0x0000000000d1ac07
clang::DiagnosticRenderer::emitMacroExpansionsAndCarets(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>, unsigned int&, unsigned int) + 243
11 clang           0x0000000000d1a87e
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
llvm::PointerUnion<clang::Diagnostic const*, clang::StoredDiagnostic const*>) +
628
12 clang           0x0000000000d09d9e
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 1208
13 clang           0x0000000001bbb8a2
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 784
14 clang           0x0000000001bb6f2b
15 clang           0x0000000001bb52a2
clang::DiagnosticsEngine::EmitCurrentDiagnostic() + 24
16 clang           0x0000000000c83701
17 clang           0x0000000000c8372e
18 clang           0x000000000103a28e
clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 2284
19 clang           0x00000000010392ae
clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void
(clang::Parser::*)(clang::Declarator&)) + 1042
20 clang           0x0000000001038e4b
clang::Parser::ParseDeclarator(clang::Declarator&) + 59
21 clang           0x0000000001031516
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 118
22 clang           0x00000000010235be
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 1042
23 clang           0x000000000102364f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 135
24 clang           0x0000000001022e77
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2835
25 clang           0x00000000010222b6
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 410
26 clang           0x000000000101f0e7 clang::ParseAST(clang::Sema&, bool, bool)
+ 488
27 clang           0x0000000000ce68f4 clang::ASTFrontendAction::ExecuteAction()
+ 298
28 clang           0x0000000000e75590 clang::CodeGenAction::ExecuteAction() +
1200
29 clang           0x0000000000ce6529 clang::FrontendAction::Execute() + 245
30 clang           0x0000000000cc12c2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 718
31 clang           0x0000000000c94512
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 999
32 clang           0x0000000000c831e8 cc1_main(char const**, char const**, char
const*, void*) + 960
33 clang           0x0000000000c8f96d main + 479
34 libc.so.6       0x00007f78577bbead __libc_start_main + 253
35 clang           0x0000000000c82479
Stack dump:
0.      Program arguments: /home/nicholas/llvm-commit4/Debug+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name a.o -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -resource-dir
/home/nicholas/llvm-commit4/Debug+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/nicholas/llvm-commit4/Debug+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/nicholas -ferror-limit 19 -fmessage-length 80
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/a-FL0g10.o -x c a.o 
1.      a.o:1:1: current parser token ''
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: error: unable to execute command: Aborted
clang: note: diagnostic msg: Error generating preprocessed source(s).

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