[LLVMbugs] [Bug 14549] New: decltype tokenizer crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 8 13:55:21 PST 2012


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

             Bug #: 14549
           Summary: decltype tokenizer crash
           Product: clang
           Version: 3.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: gasper.azman at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9664
  --> http://llvm.org/bugs/attachment.cgi?id=9664
the files required by the bugreport.

###
└─[$] <git:(master✱✈)> clang++ --version
clang version 3.2 (branches/release_32 168259)
Target: x86_64-apple-darwin11.4.1
Thread model: posix

this file:
---------------------
/** 
 */
        decltype(
---------------------
crashes in the tokenizer.

This minimal example case was produced by delta.

Crash:
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
min.c:3:18: error: expected expression
        decltype(
                 ^
Assertion failed: (Tok.is(tok::semi)), function ParseDecltypeSpecifier, file
ParseDeclCXX.cpp, line 709.
0  libLLVM-3.2svn.dylib 0x000000010988d632 _ZL15PrintStackTracePv + 34
1  libLLVM-3.2svn.dylib 0x000000010988db59 _ZL13SignalHandleri + 713
2  libsystem_c.dylib    0x00007fff8a22dcfa _sigtramp + 26
3  libsystem_c.dylib    0x00007fff8a22b789 free + 194
4  libLLVM-3.2svn.dylib 0x000000010988d876 abort + 22
5  libLLVM-3.2svn.dylib 0x000000010988d835 __assert_rtn + 53
6  clang                0x0000000107dd98fb
clang::Parser::ParseDecltypeSpecifier(clang::DeclSpec&) + 1787
7  clang                0x0000000107df1d47
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool) + 663
8  clang                0x0000000107e2b426
clang::Parser::TryAnnotateCXXScopeToken(bool) + 230
9  clang                0x0000000107dc4a6f
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 271
10 clang                0x0000000107e28a79
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 73
11 clang                0x0000000107e286df
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 239
12 clang                0x0000000107e27d47
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2903
13 clang                0x0000000107e27167
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 311
14 clang                0x0000000107dba914 clang::ParseAST(clang::Sema&, bool,
bool) + 276
15 clang                0x0000000107d7e3a2
clang::CodeGenAction::ExecuteAction() + 1298
16 clang                0x0000000107b776ed clang::FrontendAction::Execute() +
109
17 clang                0x0000000107b5978f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1007
18 clang                0x0000000107b222f1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3569
19 clang                0x0000000107b19ef8 cc1_main(char const**, char const**,
char const*, void*) + 872
20 clang                0x0000000107b1e1d4 main + 708
21 clang                0x0000000107b19b84 start + 52
22 clang                0x000000000000002e start + 18446744069285504222
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.2/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name
min.c -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu
core2 -target-linker-version 134.9 -resource-dir
/opt/local/libexec/llvm-3.2/bin/../lib/clang/3.2 -fmodule-cache-path
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/clang-module-cache -std=c++11
-fdeprecated-macro -fdebug-compilation-dir
/Users/atomicity/work/neuroblaze/bugreport -ferror-limit 19 -fmessage-length
204 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.7.0
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/min-1x0aO6.o -x c++ min.c 
1.    <eof> parser at end of file
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (branches/release_32 168259)
Target: x86_64-apple-darwin11.4.1
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/min-4RhMFb.cpp
clang: note: diagnostic msg:
/var/folders/m_/3_5ql04s76d72m5n787y6cxh0000gn/T/min-4RhMFb.sh
clang: note: diagnostic msg: 

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

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