<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion `Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()' failed."
href="https://bugs.llvm.org/show_bug.cgi?id=44924">44924</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()' failed.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>changochen1@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>POC:
---
a ( ( void ( struct {
; ) ) 0
---
Run script:
---
clang++ -o tmp ./poc.cpp
---
Stack dump:
---
clang++: /home/rxz226/llvm-project/clang/lib/Parse/ParseExprCXX.cpp:3843:
clang::ExprResult
clang::Parser::ParseCXXAmbiguousParenExpression(clang::Parser::ParenParseOption&,
clang::ParsedType&, clang::BalancedDelimiterTracker&,
clang::ColonProtectionRAIIObject&): Assertion `Tok.is(tok::eof) &&
Tok.getEofData() == AttrEnd.getEofData()' failed.
Stack dump:
0. Program arguments: /home/rxz226/llvm-project/bld/bin/clang++ -x c++ -o
tm ./test1.c
1. ./test1.c:2:24: current parser token ''
#0 0x000000000511679b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:0
#1 0x000000000511682e PrintStackTraceSignalHandler(void*)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:625:0
#2 0x00000000051145b6 llvm::sys::RunSignalHandlers()
/home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:68:0
#3 0x0000000005115fd7 llvm::sys::CleanupOnSignal(unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:0
#4 0x000000000501be1f (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:0
#5 0x000000000501c2fe CrashRecoverySignalHandler(int)
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:362:0
#6 0x00007f6f2e26f390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#7 0x00007f6f2cf7e428 raise
/build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#8 0x00007f6f2cf8002a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0
#9 0x00007f6f2cf76bd7 __assert_fail_base
/build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0
#10 0x00007f6f2cf76c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#11 0x0000000007a7fd0f
clang::Parser::ParseCXXAmbiguousParenExpression(clang::Parser::ParenParseOption&,
clang::OpaquePtr<clang::QualType>&, clang::BalancedDelimiterTracker&,
clang::ColonProtectionRAIIObject&) /home/rxz226/llvm-
project/clang/lib/Parse/ParseExprCXX.cpp:3844:0
#12 0x0000000007a69a48
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&)
/home/rxz226/llvm-project/clang/lib/Parse/ParseExpr.cpp:2712:0
#13 0x0000000007a6116d
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&,
clang::Parser::TypeCastState, bool, bool*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseExpr.cpp:936:0
#14 0x0000000007a60d00
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool,
clang::Parser::TypeCastState, bool, bool*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseExpr.cpp:668:0
#15 0x0000000007a5e893
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
/home/rxz226/llvm-project/clang/lib/Parse/ParseExpr.cpp:175:0
#16 0x0000000007a6b8d0
clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&,
llvm::SmallVectorImpl<clang::SourceLocation>&, llvm::function_ref<void ()>)
/home/rxz226/llvm-project/clang/lib/Parse/ParseExpr.cpp:
3127:0
#17 0x0000000007a1fdbc
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseDecl.c
pp:2432:0
#18 0x0000000007a1e882 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/rxz226/llvm-project/clang/lib/Parse/ParseDecl.cpp:2129:0
#19 0x00000000079ff6cd
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:1110:0
#20 0x00000000079ff7ab
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:1125:0
#21 0x00000000079fec86
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:945:0
#22 0x00000000079fdf00
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:696:0
#23 0x00000000079fd881
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
/home/rxz226/llvm-project/clang/lib/Parse/Parser.cpp:564:0
#24 0x00000000079f97d7 clang::ParseAST(clang::Sema&, bool, bool)
/home/rxz226/llvm-project/clang/lib/Parse/ParseAST.cpp:157:0
...
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
56b7f595d2b402ff177ca42214325c8fdea10fb0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rxz226/llvm-project/bld/bin
---</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>