[LLVMbugs] [Bug 18052] New: lambdas called within NSDMI of nested classes cause crashes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 24 21:23:56 PST 2013


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

            Bug ID: 18052
           Summary: lambdas called within NSDMI of nested classes cause
                    crashes
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: faisalv at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This code causes clang to create the following assertion:
struct X1 {
  struct X2 {
    int L = ([] (int i) { return i; })(2);
  };
};


Command 0 Stderr:
A s s e r t i o n   f a i l e d :   g e t C o n t a i n i n g D C ( D C )   = =
  C u r C o n t e x
t   & &   " T h e   n e x t   D e c l C o n t e x t   s h o u l d   b e   l e x
i c a l l y   c o n
t a i n e d   i n   t h e   c u r r e n t   o n e . " ,   f i l e   F : \ c l a
n g - g i t \ l l v
m \ t o o l s \ c l a n g \ l i b \ S e m a \ S e m a D e c l . c p p ,   l i n
e   8 9 7
 Stack dump:
0.      Program arguments: F:/clang-git/build/bin/Debug/clang.EXE -cc1
-internal-isystem F:\clang-gi
t\build\bin\Debug\..\lib\clang\3.4\include -std=c++1y -verify -fsyntax-only
-fblocks -emit-llvm-only
 F:\clang-git\llvm\tools\clang\test\semacxx\cxx1z-auto-nsdmi.cpp
1.      F:\clang-git\llvm\tools\clang\test\semacxx\cxx1z-auto-nsdmi.cpp:216:25:
current parser token
 '{'
2.      F:\clang-git\llvm\tools\clang\test\semacxx\cxx1z-auto-nsdmi.cpp:208:1:
parsing namespace 'ne
sted_structs_with_auto_nsdmi'
3.      F:\clang-git\llvm\tools\clang\test\semacxx\cxx1z-auto-nsdmi.cpp:209:1:
parsing struct/union/
class body 'X1'
4.      F:\clang-git\llvm\tools\clang\test\semacxx\cxx1z-auto-nsdmi.cpp:216:14:
lambda expression pa
rsing
0x0FCBC94A (0x0000000A 0x00000000 0x00BC90F4 0x0FD97114), exit() + 0x13A
bytes(s)
0x0FDA7A9C (0x00BC963C 0x00BC9108 0xCCCCCCCC 0xCCCCCCCC), abort() + 0x1C
bytes(s)
0x0FD97114 (0x04F34DE0 0x04F34D78 0x00000381 0x00BC9778), _wassert() + 0xC04
bytes(s)
0x02DA0B63 (0x00EAE0F8 0x00ECEBB4 0x00BC97C4 0x00BC9778),
clang::Sema::PushDeclContext() + 0x43 byte
s(s), f:\clang-git\llvm\tools\clang\lib\sema\semadecl.cpp, line 897 + 0x34
byte(s)
0x030187A3 (0x00BC9FD0 0x00BC9AF4 0x00EAE0F8 0x00BCA048),
clang::Sema::ActOnStartOfLambdaDefinition(
) + 0x523 bytes(s), f:\clang-git\llvm\tools\clang\lib\sema\semalambda.cpp, line
765
0x02C82953 (0x00BCA074 0x00BC9FD0 0x00BCAED8 0xCCCCCCCC),
clang::Parser::ParseLambdaExpressionAfterI
ntroducer() + 0x7D3 bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parseexprcxx.cpp, line 1071
0x02C81441 (0x00BCA074 0x00BCAF28 0x00BCC788 0xCCCCCCCC),
clang::Parser::ParseLambdaExpression() + 0
xE1 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexprcxx.cpp, line
646 + 0x10 byte(s)
0x02C78455 (0x00BCAF10 0x00000000 0x00000000 0x00BCAF1F),
clang::Parser::ParseCastExpression() + 0x1
CD5 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 1265
+ 0xF byte(s)
0x02C789F9 (0x00BCAF44 0x00000000 0x00000000 0x00000001),
clang::Parser::ParseCastExpression() + 0x3
9 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 420
0x02C75B29 (0x00BCAF64 0x00000001 0xCCCCCCCC 0xCCCCCCCC),
clang::Parser::ParseAssignmentExpression()
 + 0x99 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line
169
0x02C7595A (0x00BCAF9C 0x00000001 0x00BCC5F4 0x00BCC788),
clang::Parser::ParseExpression() + 0x2A by
tes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 121
0x02C7C53C (0x00BCBA00 0x00BCC5D4 0x00000000 0x00000000),
clang::Parser::ParseParenExpression() + 0x
CBC bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 2216
+ 0x11 byte(s)
0x02C76899 (0x00BCC62C 0x00000000 0x00000000 0x00BCC63B),
clang::Parser::ParseCastExpression() + 0x1
19 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 652 +
0x3B byte(s)
0x02C789F9 (0x00BCC660 0x00000000 0x00000000 0x00000000),
clang::Parser::ParseCastExpression() + 0x3
9 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line 420
0x02C75B29 (0x00BCC758 0x00000000 0x00EA8DB8 0x00BCC708),
clang::Parser::ParseAssignmentExpression()
 + 0x99 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parseexpr.cpp, line
169
0x02C65EB0 (0x00BCC758 0x00BCC770 0x00BCC788 0xCCCCCCCC),
clang::Parser::ParseInitializer() + 0x30 b
ytes(s), f:\clang-git\llvm\tools\clang\include\clang\parse\parser.h, line 1439
+ 0xE byte(s)
0x02CA0BFC (0x00BCC758 0x00ECE6B0 0x00000000 0x00BCC764),
clang::Parser::ParseCXXMemberInitializer()
 + 0x22C bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parsedeclcxx.cpp,
line 2472 + 0xC byte(s)

0x02CAD923 (0x00EB3190 0x00EB3190 0x00BCC804 0x02CAD756),
clang::Parser::ParseLexedMemberInitializer
() + 0xA3 bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parsecxxinlinemethods.cpp, line 548
0x02CABC2D (0x00BCC898 0x00BCC81C 0x00EB3190 0x01CCCCCC),
clang::Parser::LateParsedMemberInitializer
::ParseLexedMemberInitializers() + 0x1D bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parsecxxin
linemethods.cpp, line 270
0x02CAD756 (0x00E3F070 0x00EAD378 0x00BCC898 0x02CAD756),
clang::Parser::ParseLexedMemberInitializer
s() + 0x1D6 bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parsecxxinlinemethods.cpp, line 519 +
0x23 byte(s)
0x02CABB70 (0x00BCCB58 0x00BCE540 0x00EAD378 0x00CCCCCC),
clang::Parser::LateParsedClass::ParseLexed
MemberInitializers() + 0x20 bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parsecxxinlinemethods.
cpp, line 254
0x02CAD756 (0x00E3F028 0x00BCD2D8 0x00BCE540 0xCCCCCCCC),
clang::Parser::ParseLexedMemberInitializer
s() + 0x1D6 bytes(s),
f:\clang-git\llvm\tools\clang\lib\parse\parsecxxinlinemethods.cpp, line 519 +
0x23 byte(s)
0x02CA07FE (0x00000F4E 0x00000F55 0x00BCD1FC 0x00000011),
clang::Parser::ParseCXXMemberSpecification
() + 0xAFE bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parsedeclcxx.cpp,
line 2718
0x02C9F8E3 (0x00000064 0x00000F4E 0x00BCD728 0x00BCD6AC),
clang::Parser::ParseClassSpecifier() + 0x1
6C3 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parsedeclcxx.cpp, line
1609
0x02C56C51 (0x00BCD728 0x00BCD6AC 0x00000003 0x00000004),
clang::Parser::ParseDeclarationSpecifiers(
) + 0x16B1 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parsedecl.cpp,
line 3032
0x02C3CEB8 (0x00BCDC78 0x00BCDC90 0x00BCD728 0x00000003),
clang::Parser::ParseDeclOrFunctionDefInter
nal() + 0x38 bytes(s), f:\clang-git\llvm\tools\clang\lib\parse\parser.cpp, line
880

-- 
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/20131125/30cc3b78/attachment.html>


More information about the llvm-bugs mailing list