[LLVMbugs] [Bug 19683] New: crash on invalid Cls<T>::(value) assertion !EnteredScope && "Already entered the scope!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 7 14:22:13 PDT 2014


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

            Bug ID: 19683
           Summary: crash on invalid Cls<T>::(value) assertion
                    !EnteredScope && "Already entered the scope!"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Testcase:

template<typename> class Cls;
template<typename T> Cls<T>::(value);

Also note similar bug 12809 which may be related but doesn't have the '::('
construct which is where I think the extra scope is.

Crash:

$ gdb --args clang -cc1 x.ii
(gdb) run
Starting program: /usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/clang
-cc1 x.ii
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/grte/v3/lib64/libthread_db.so.1".
clang:
/usr/local/google/home/nlewycky/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:2163:
void clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope(): Assertion
`!EnteredScope && "Already entered the scope!"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6ced425 in __GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6ced425 in __GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff6cf0b8b in __GI_abort () at abort.c:91
#2  0x00007ffff6ce60ee in __assert_fail_base (fmt=<optimized out>,
assertion=0x3d050e8 "!EnteredScope && \"Already entered the scope!\"",
file=0x3d04e78
"/usr/local/google/home/nlewycky/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h",
line=<optimized out>, function=<optimized out>) at assert.c:94
#3  0x00007ffff6ce6192 in __GI___assert_fail (assertion=0x3d050e8
"!EnteredScope && \"Already entered the scope!\"", file=0x3d04e78
"/usr/local/google/home/nlewycky/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h",
line=2163, function=0x3d0a4e0
<clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope()::__PRETTY_FUNCTION__>
"void clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope()") at
assert.c:103
#4  0x000000000151ebee in
clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope (this=0x7fffffffb0b0)
at
/usr/local/google/home/nlewycky/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:2163
#5  0x000000000153002e in clang::Parser::ParseDirectDeclarator (this=0x61b0110,
D=...) at ParseDecl.cpp:4820
#6  0x000000000152ecc4 in clang::Parser::ParseDeclaratorInternal
(this=0x61b0110, D=..., DirectDeclParser=(void (clang::Parser::*)(clang::Parser
* const, clang::Declarator &)) 0x152f6da
<clang::Parser::ParseDirectDeclarator(clang::Declarator&)>) at
ParseDecl.cpp:4527
#7  0x000000000152ea0c in clang::Parser::ParseDeclarator (this=0x61b0110,
D=...) at ParseDecl.cpp:4463
#8  0x00000000015829de in clang::Parser::ParseSingleDeclarationAfterTemplate
(this=0x61b0110, Context=0, TemplateInfo=..., DiagsFromTParams=...,
DeclEnd=..., AS=clang::AS_none, AccessAttrs=0x0) at ParseTemplate.cpp:210
#9  0x0000000001582630 in
clang::Parser::ParseTemplateDeclarationOrSpecialization (this=0x61b0110,
Context=0, DeclEnd=..., AS=clang::AS_none, AccessAttrs=0x0) at
ParseTemplate.cpp:145
#10 0x000000000158224b in clang::Parser::ParseDeclarationStartingWithTemplate
(this=0x61b0110, Context=0, DeclEnd=..., AS=clang::AS_none, AccessAttrs=0x0) at
ParseTemplate.cpp:39
#11 0x0000000001524a56 in clang::Parser::ParseDeclaration (this=0x61b0110,
Stmts=..., Context=0, DeclEnd=..., attrs=...) at ParseDecl.cpp:1298
#12 0x000000000151374c in clang::Parser::ParseExternalDeclaration
(this=0x61b0110, attrs=..., DS=0x0) at Parser.cpp:699
#13 0x000000000151301c in clang::Parser::ParseTopLevelDecl (this=0x61b0110,
Result=...) at Parser.cpp:557
#14 0x000000000150c48c in clang::ParseAST (S=..., PrintStats=false,
SkipFunctionBodies=false) at ParseAST.cpp:145
#15 0x00000000010140be in clang::ASTFrontendAction::ExecuteAction
(this=0x614d0e0) at FrontendAction.cpp:487
#16 0x0000000001013bf3 in clang::FrontendAction::Execute (this=0x614d0e0) at
FrontendAction.cpp:388
#17 0x0000000000fe1c9e in clang::CompilerInstance::ExecuteAction
(this=0x614c360, Act=...) at CompilerInstance.cpp:727
#18 0x0000000000fa8a66 in clang::ExecuteCompilerInvocation (Clang=0x614c360) at
ExecuteCompilerInvocation.cpp:239
#19 0x0000000000f9708d in cc1_main (ArgBegin=0x7fffffffd8d8,
ArgEnd=0x7fffffffd8e0, Argv0=0x7fffffffe7c0
"/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/clang",
MainAddr=0xfa214e <GetExecutablePath(char const*, bool)>) at cc1_main.cpp:112
#20 0x0000000000fa362f in main (argc_=3, argv_=0x7fffffffe498) at
driver.cpp:319

-- 
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/20140507/b00a7149/attachment.html>


More information about the llvm-bugs mailing list