[llvm-bugs] [Bug 44924] New: Assertion `Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Feb 15 10:58:19 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44924
Bug ID: 44924
Summary: Assertion `Tok.is(tok::eof) && Tok.getEofData() ==
AttrEnd.getEofData()' failed.
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: changochen1 at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
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 (https://github.com/llvm/llvm-project.git
56b7f595d2b402ff177ca42214325c8fdea10fb0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rxz226/llvm-project/bld/bin
---
--
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/20200215/7884177b/attachment.html>
More information about the llvm-bugs
mailing list