[LLVMbugs] [Bug 9137] New: Parser crash with wrong code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 4 03:33:40 PST 2011


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

           Summary: Parser crash with wrong code
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ismail at namtrac.org
                CC: llvmbugs at cs.uiuc.edu


[~]> cat test.c 
static __attribute__((always_inline)) inline void AV_COPY128(void *d, const
void *s)
            : "=m"(*(struct v*)d)

[~]> clang test.c 
Assertion failed: (getLang().CPlusPlus && "Call sites of this function should
be guarded by checking for C++"), function ParseOptionalCXXScopeSpecifier, file
ParseExprCXX.cpp, line 65.
0  clang             0x0000000101521bf2
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
754
1  clang             0x0000000101522a43
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
4419
2  libSystem.B.dylib 0x00007fff885db67a _sigtramp + 26
3  libSystem.B.dylib 0x0000000102033339 _sigtramp + 2040888537
4  clang             0x000000010001a762
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 3474
5  clang             0x0000000100312364
llvm::SmallVectorTemplateCommon<clang::Sema::OffsetOfComponent>::operator[](unsigned
int) + 28356
6  clang             0x00000001002f99e9
clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope() + 6105
7  clang             0x00000001002fa94f
clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope() + 10047
8  clang             0x000000010033a23b
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 43339
9  clang             0x00000001002ee446 clang::Parser::ConsumeAnyToken() +
30534
10 clang             0x000000010033a505
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 44053
11 clang             0x000000010033a947
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 45143
12 clang             0x000000010033bc0f
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 49951
13 clang             0x000000010033be63
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 50547
14 clang             0x00000001002e4b1f llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateAdd(llvm::Value*, llvm::Value*, llvm::Twine const&) + 463
15 clang             0x00000001002b4ccc llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateIsNull(llvm::Value*, llvm::Twine const&) + 3980
16 clang             0x00000001000539f9 llvm::DenseMap<clang::IdentifierInfo
const*, unsigned int, llvm::DenseMapInfo<clang::IdentifierInfo const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 7849
17 clang             0x0000000100024962 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 2002
18 clang             0x000000010001c5da
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 11274
19 clang             0x0000000100023994 std::vector<std::string,
std::allocator<std::string> >::operator=(std::vector<std::string,
std::allocator<std::string> > const&) + 12260
20 clang             0x000000010001aee4
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 5396
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name
testcase-min.i -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 97.17 -resource-dir
/usr/local/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 120
-stack-protector 1 -fblocks -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/qk/qkch7RbJFkysE0a-GLNGMU+++TM/-Tmp-/cc-wFiz1e.o -x cpp-output
testcase-min.i 
1.    testcase-min.i:2:15: current parser token '"=m"'
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

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