[LLVMbugs] [Bug 15910] New: NumericLiteralParser: crash when saving header file during compilation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 4 18:15:22 PDT 2013


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

            Bug ID: 15910
           Summary: NumericLiteralParser: crash when saving header file
                    during compilation
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jed at 59a2.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I don't know if this is the reason for the crash, but the timing coincided with
saving the file 'petscerror.h'.  I could not reproduce by attempting to
recompile.

0  libLLVM-3.2.so  0x00007f326d6d984f
1  libLLVM-3.2.so  0x00007f326d6d9bc9
2  libpthread.so.0 0x00007f326c9e00e0
3  clang           0x0000000000fe7719
clang::NumericLiteralParser::NumericLiteralParser(llvm::StringRef,
clang::SourceLocation, clang::Preprocessor&) + 89
4  clang           0x0000000000a0db4a
clang::Sema::ActOnNumericConstant(clang::Token const&, clang::Scope*) + 298
5  clang           0x000000000089e53f clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 1231
6  clang           0x00000000008a103d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
7  clang           0x00000000008a19b6
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 2150
8  clang           0x00000000008a10df
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 47
9  clang           0x00000000008a1139
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
10 clang           0x00000000008a68ed
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLoca
tion&) + 4253
11 clang           0x000000000089e505 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 1173
12 clang           0x00000000008a103d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
13 clang           0x00000000008a19b6
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 2150
14 clang           0x00000000008a10df
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 47
15 clang           0x00000000008a1139
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9
16 clang           0x00000000008cdea2
clang::Parser::ParseParenExprOrCondition(clang::ActionResult<clang::Expr*,
true>&, clang::Decl*&, clang::SourceLocation, bool) + 626
17 clang           0x00000000008d8839
clang::Parser::ParseIfStatement(clang::SourceLocation*) + 281
18 clang           0x00000000008d4c9b
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::P
arser::ParsedAttributesWithRange&) + 1259
19 clang           0x00000000008d55d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
20 clang           0x00000000008d232d
clang::Parser::ParseCompoundStatementBody(bool) + 2141
21 clang           0x00000000008d2bbe
clang::Parser::ParseCompoundStatement(bool, unsigned int) + 30
22 clang           0x00000000008d2bf2
clang::Parser::ParseCompoundStatement(bool) + 18
23 clang           0x00000000008d4d2a
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::$
arser::ParsedAttributesWithRange&) + 1402
24 clang           0x00000000008d55d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
25 clang           0x00000000008d5ad2 clang::Parser::ParseDoStatement() + 290
26 clang           0x00000000008d4d08
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::$
arser::ParsedAttributesWithRange&) + 1368
27 clang           0x00000000008d55d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
28 clang           0x00000000008d232d
clang::Parser::ParseCompoundStatementBody(bool) + 2141
29 clang           0x00000000008d2bbe
clang::Parser::ParseCompoundStatement(bool, unsigned int) + 30
30 clang           0x00000000008d2bf2
clang::Parser::ParseCompoundStatement(bool) + 18
31 clang           0x00000000008d4d2a
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::$
arser::ParsedAttributesWithRange&) + 1402
32 clang           0x00000000008d55d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
33 clang           0x00000000008d5ad2 clang::Parser::ParseDoStatement() + 290
34 clang           0x00000000008d4d08
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::$
arser::ParsedAttributesWithRange&) + 1368
35 clang           0x00000000008d55d5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
36 clang           0x00000000008d232d
clang::Parser::ParseCompoundStatementBody(bool) + 2141
37 clang           0x00000000008da11e
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 110
38 clang           0x0000000000879b0d
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAt
trList*) + 1421
39 clang           0x000000000088b083
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 2787
40 clang           0x0000000000873ffd
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifie
r) + 237
41 clang           0x00000000008747d1
42 clang           0x000000000087480f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSp
ecifier) + 31
43 clang           0x0000000000877db1
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 305
44 clang           0x0000000000878392
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
45 clang           0x00000000008705fb clang::ParseAST(clang::Sema&, bool, bool)
+ 283
46 clang           0x0000000000616d71 clang::FrontendAction::Execute() + 81
47 clang           0x00000000005fa2da
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 282
48 clang           0x00000000005e4fef
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1455
49 clang           0x00000000005e07c8 cc1_main(char const**, char const**, char
const*, void*) + 1176
50 clang           0x00000000005df312 main + 7522
51 libc.so.6       0x00007f326c12ba15 __libc_start_main + 245
52 clang           0x00000000005df861
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
specest.c -mreloca
tion-model pic -pic-level 2 -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.2
3.2 -momit-leaf-frame-pointer -g -coverage-file
/home/jed/.ccache/e/d/33e4e3b5eec76bd0ab06f6cf88071f-593941.o.tmp.batura.24695
-resource-dir /usr/bin/../lib/clang/3.2 -D __I
NSDIR__= -D petsc_EXPORTS -I /home/jed/petsc/include -I
/home/jed/petsc/mpich-clang/include -I /usr/cbind/include -I
/usr/forbind/include -I /home/jed/usr/ccache/mpich-clang
/include -I /home/jed/usr/mpich-clang/include -I
/home/jed/usr/mpich-clang/include -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include -inte
rnal-isystem /usr/bin/../lib/clang/3.2/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O0 -Wall -Wwrite-strings
-Wno-strict-aliasing -Wno-
unknown-pragmas -fconst-strings -fdebug-compilation-dir
/home/jed/petsc/mpich-clang -ferror-limit 19 -fmessage-length 0 -fvisibility
hidden -mstackrealign -fno-inline -fobjc
-runtime=gcc -fdiagnostics-show-option -o
/home/jed/.ccache/e/d/33e4e3b5eec76bd0ab06f6cf88071f-593941.o.tmp.batura.24695
-x c /home/jed/petsc/src/ksp/ksp/impls/specest/spece
st.c 
1.      /home/jed/petsc/include/petsc-private/kspimpl.h:270:3 <Spelling=clang:
error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix

Since I can't add two attechments at once, the contents of specest-L5oleV.sh
is:

/usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all
-disable-free -disable-llvm-verifier -main-file-name specest.c
-mrelocation-model pic -pic-level 2 -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.23.2 -momit-leaf-frame-pointer -g
-D "__INSDIR__=" -D "petsc_EXPORTS" -O0 -Wall -Wwrite-strings
-Wno-strict-aliasing -Wno-unknown-pragmas -fconst-strings -ferror-limit 19
-fmessage-length 0 -fvisibility hidden -mstackrealign -fno-inline
-fobjc-runtime=gcc -fdiagnostics-show-option -x c specest-L5oleV.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130505/6385383c/attachment.html>


More information about the llvm-bugs mailing list