[llvm-bugs] [Bug 44744] New: Assertion `(!E || isa<FunctionParmPackExpr>(E)) && "missing non-odr-use marking for unevaluated decl ref"' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 31 12:13:46 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44744
Bug ID: 44744
Summary: Assertion `(!E || isa<FunctionParmPackExpr>(E)) &&
"missing non-odr-use marking for unevaluated decl
ref"' failed.
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: changochen1 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
POC:
---
# 1 "<built-in>"
# 1 "test1.c"
a() { int b[c(); chk(sizeof(b), d)
---
Run script:
---
# Crash reproducer for clang version 11.0.0
(https://github.com/llvm/llvm-project.git
56b7f595d2b402ff177ca42214325c8fdea10fb0)
# Driver args: "-x" "c" "-o" "test" "test1.c"
# Original command: "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1"
"-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-main-file-name" "test1.c" "-mrelocation-model" "static" "-mthread-model"
"posix" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu"
"x86-64" "-dwarf-column-info" "-fno-split-dwarf-inlining"
"-debugger-tuning=gdb" "-resource-dir"
"/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0" "-internal-isystem"
"/usr/local/include" "-internal-isystem"
"/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-fdebug-compilation-dir" "/home/rxz226/fuzz_clang4/hangs/test"
"-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1"
"-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics"
"-faddrsig" "-o" "/tmp/test1-9f6566.o" "-x" "c" "test1.c"
"/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-main-file-name" "test1.c" "-mrelocation-model" "static" "-mthread-model"
"posix" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu"
"x86-64" "-dwarf-column-info" "-fno-split-dwarf-inlining"
"-debugger-tuning=gdb" "-ferror-limit" "19" "-fmessage-length" "0"
"-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-faddrsig" "-x" "c" "test1-d845ed.c"
---
Stack dump:
---
clang: /home/rxz226/llvm-project/clang/lib/Sema/SemaExpr.cpp:16941: void
DoMarkVarDeclReferenced(clang::Sema &, clang::SourceLocation, clang::VarDecl *,
clang::Expr *): Assertion `(!E || isa<FunctionParmPackExpr>(E)) && "missing
non-odr-use marking for unevaluated decl ref"' failed.
Stack dump:
0. Program arguments: /home/rxz226/llvm-project/bld_instru/bin/clang -x c
-o test test1.c
1. test1.c:1:52: current parser token ')'
2. test1.c:1:5: parsing function body 'a'
3. test1.c:1:5: in compound statement ('{}')
#0 0x000000000681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7
#1 0x000000000681ac5e llvm::sys::RunSignalHandlers()
/home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18
#2 0x000000000681dd30 llvm::sys::CleanupOnSignal(unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3
#3 0x000000000662a5aa (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5
#4 0x000000000662a9e6
/home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51
#5 0x00007ff9e828b390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#6 0x00007ff9e6df5428 raise
/build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#7 0x00007ff9e6df702a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0
#8 0x00007ff9e6dedbd7 __assert_fail_base
/build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0
#9 0x00007ff9e6dedc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#10 0x000000000c72de57 DoMarkVarDeclReferenced(clang::Sema&,
clang::SourceLocation, clang::VarDecl*, clang::Expr*)
/home/rxz226/llvm-project/clang/lib/Sema/SemaExpr.cpp:16964:18
#11 0x000000000c72e5f5 MarkExprReferenced(clang::Sema&, clang::SourceLocation,
clang::Decl*, clang::Expr*, bool)
/home/rxz226/llvm-project/clang/lib/Sema/SemaExpr.cpp:17004:5
#12 0x000000000c9528c5 clang::ActionResult<clang::Expr*,
true>::ActionResult(clang::Expr*)
/home/rxz226/llvm-project/clang/include/clang/Sema/Ownership.h:0:0
#13 0x000000000c9528c5 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformDeclRefExpr(clang::DeclRefExpr*)
/home/rxz226/llvm-project/clang/lib/Sema/TreeTransform.h:9464:0
#14 0x000000000c938c47 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformExpr(clang::Expr*)
/home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:961:1
#15 0x000000000c960b84 clang::ActionResult<clang::Expr*, true>::isInvalid()
const /home/rxz226/llvm-project/clang/include/clang/Sema/Ownership.h:0:0
#16 0x000000000c960b84 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformParenExpr(clang::ParenExpr*)
/home/rxz226/llvm-project/clang/lib/Sema/TreeTransform.h:9566:0
#17 0x000000000c9396e0 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformExpr(clang::Expr*)
/home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:1247:1
#18 0x000000000c966ad5 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformUnaryExprOrTypeTraitExpr(clang::UnaryExprOrTypeTraitExpr*)
/home/rxz226/llvm-project/clang/lib/Sema/TreeTransform.h:9743:28
#19 0x000000000c936ad1 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformExpr(clang::Expr*)
/home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:1331:1
#20 0x000000000c9914d5 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformInitializer(clang::Expr*, bool)
/home/rxz226/llvm-project/clang/lib/Sema/TreeTransform.h:0:0
#21 0x000000000c990553 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformExprs(clang::Expr* const*, unsigned int,
bool, llvm::SmallVectorImpl<clang::Expr*>&, bool*)
/home/rxz226/llvm-project/clang/lib/Sema/Tr
eeTransform.h:3708:29
#22 0x000000000c94c2d1 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformCallExpr(clang::CallExpr*)
/home/rxz226/llvm-project/clang/lib/Sema/TreeTransform.h:9823:20
#23 0x000000000c939622 clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformExpr(clang::Expr*)
/home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:801:1
#24 0x000000000c935fbb clang::Sema::SFINAETrap::hasErrorOccurred() const
/home/rxz226/llvm-project/clang/include/clang/Sema/Sema.h:0:0
...
---
--
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/20200131/adede75b/attachment.html>
More information about the llvm-bugs
mailing list