llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.33k stars 11.7k forks source link

Assertion `!D->isInvalidDecl() && "Cannot get lay out of invalid decl!"' failed. #44079

Open llvmbot opened 4 years ago

llvmbot commented 4 years ago
Bugzilla Link 44734
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @zygoloid

Extended Description

Preprocessed code:

# 1 "<built-in>"
# 1 "test1.c"
struct {
  struct {
    union {
      struct a {};
    };
  };
} b(struct {struct a{} c} d) {
}

Run script:(just run with clang -x c -o poc poc.c)

# Crash reproducer for clang version 11.0.0 (https://github.com/llvm/llvm-project.git 56b7f595d2b402ff177ca42214325c8fdea10fb0)
# Driver args: "-x" "c" "test1.c" "-o" "test"
# 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_clang1/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-c120b3.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-dbae46.c"

Stack dump:

 #&#8203;0 0x000000000681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7
 #&#8203;1 0x000000000681ac5e llvm::sys::RunSignalHandlers() /home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18
 #&#8203;2 0x000000000681dd30 llvm::sys::CleanupOnSignal(unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3
 #&#8203;3 0x000000000662a5aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5
 #&#8203;4 0x000000000662a9e6 /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51
 #&#8203;5 0x00007efd917a8390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #&#8203;6 0x00007efd90312428 raise /build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
 #&#8203;7 0x00007efd9031402a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0
 #&#8203;8 0x00007efd9030abd7 __assert_fail_base /build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0
 #&#8203;9 0x00007efd9030ac82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#&#8203;10 0x000000000e925341 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const /home/rxz226/llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp:3035:3
#&#8203;11 0x000000000744f814 (anonymous namespace)::X86_64ABIInfo::classify(clang::QualType, unsigned long, (anonymous namespace)::X86_64ABIInfo::Class&, (anonymous namespace)::X86_64ABIInfo::Class&, bool) const /home/rxz226/llvm-pro$
ect/clang/lib/CodeGen/TargetInfo.cpp:2825:50
#&#8203;12 0x000000000744c913 (anonymous namespace)::X86_64ABIInfo::classifyArgumentType(clang::QualType, unsigned int, unsigned int&, unsigned int&, bool) const /home/rxz226/llvm-project/clang/lib/CodeGen/TargetInfo.cpp:3451:3
#&#8203;13 0x0000000007448a9b (anonymous namespace)::X86_64ABIInfo::computeInfo(clang::CodeGen::CGFunctionInfo&) const /home/rxz226/llvm-project/clang/lib/CodeGen/TargetInfo.cpp:3687:16
#&#8203;14 0x00000000075e0723 clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>, bool, bool, llvm::ArrayRef<clang::CanQual<clang::Type> >, clang::FunctionType::ExtInfo, llvm::ArrayRef<clang::FunctionTyp$
::ExtParameterInfo>, clang::CodeGen::RequiredArgs) /home/rxz226/llvm-project/clang/lib/CodeGen/CGCall.cpp:782:29
#&#8203;15 0x00000000075e13db arrangeLLVMFunctionInfo(clang::CodeGen::CodeGenTypes&, bool, llvm::SmallVectorImpl<clang::CanQual<clang::Type> >&, clang::CanQual<clang::FunctionProtoType>) /home/rxz226/llvm-project/clang/lib/CodeGen/CGC$
ll.cpp:185:14
#&#8203;16 0x00000000075e4aac clang::CodeGen::CodeGenTypes::arrangeFreeFunctionType(clang::CanQual<clang::FunctionProtoType>) /home/rxz226/llvm-project/clang/lib/CodeGen/CGCall.cpp:196:10
#&#8203;17 0x00000000075e4aac clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(clang::FunctionDecl const*) /home/rxz226/llvm-project/clang/lib/CodeGen/CGCall.cpp:452:0
#&#8203;18 0x00000000075e7299 clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(clang::GlobalDecl) /home/rxz226/llvm-project/clang/lib/CodeGen/CGCall.cpp:0:10
#&#8203;19 0x00000000071425e5 clang::CodeGen::CodeGenModule::getTypes() /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.h:0:0
#&#8203;20 0x00000000071425e5 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4449:0
#&#8203;21 0x000000000712b445 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2867:3
#&#8203;22 0x0000000007135f70 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2569:5
#&#8203;23 0x000000000714ae49 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:5284:5
#&#8203;24 0x000000000912bac6 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) /home/rxz226/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:169:35
#&#8203;25 0x0000000009122725 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:216:11
#&#8203;26 0x000000000bbabb2d clang::ParseAST(clang::Sema&, bool, bool) /home/rxz226/llvm-project/clang/lib/Parse/ParseAST.cpp:162:31
#&#8203;27 0x0000000007dff26a clang::ASTFrontendAction::ExecuteAction() /home/rxz226/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1045:1
#&#8203;28 0x000000000911b260 clang::CodeGenAction::ExecuteAction() /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1176:28
#&#8203;29 0x0000000007dfd6b9 clang::FrontendAction::Execute() /home/rxz226/llvm-project/clang/lib/Frontend/FrontendAction.cpp:940:10
#&#8203;30 0x0000000007d39f27 llvm::Error::operator bool() /home/rxz226/llvm-project/llvm/include/llvm/Support/Error.h:0:0
#&#8203;31 0x0000000007d39f27 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/rxz226/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:965:0
#&#8203;32 0x00000000080c5534 clang::CompilerInstance::getFrontendOpts() /home/rxz226/llvm-project/clang/include/clang/Frontend/CompilerInstance.h:0:0
#&#8203;33 0x00000000080c5534 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/rxz226/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:291:0
#&#8203;34 0x0000000000a7ac38 llvm::TimeTraceScope::~TimeTraceScope() /home/rxz226/llvm-project/llvm/include/llvm/Support/TimeProfiler.h:0:0
#&#8203;35 0x0000000000a7ac38 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/rxz226/llvm-project/clang/tools/driver/cc1_main.cpp:240:0
#&#8203;36 0x0000000000a6c1fb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /home/rxz226/llvm-project/clang/tools/driver/driver.cpp:328:12
llvmbot commented 4 years ago

The bug is found by Yongheng Chen and Rui Zhong

Endilll commented 1 year ago

Still reproduces on trunk with assertions, as of unreleased Clang 17: https://godbolt.org/z/xjEKqKf4b

llvmbot commented 1 year ago

@llvm/issue-subscribers-clang-codegen

llvmbot commented 1 year ago

@llvm/issue-subscribers-c

Endilll commented 1 year ago

CC @AaronBallman

Endilll commented 1 year ago
clang++: /root/llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp:3295:
const clang::ASTRecordLayout& clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*) const:
Assertion `!D->isInvalidDecl() && "Cannot get layout of invalid decl!"' failed.

Stack dump:
0.  Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -x c <source>
1.  <eof> parser at end of file
2.  test1.c:7:3: LLVM IR generation of declaration 'b'
3.  test1.c:7:3: Generating code for declaration 'b'
 #0 0x0000558ee8bed1af llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c4e1af)
 #1 0x0000558ee8beaf1c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c4bf1c)
 #2 0x0000558ee8b35608 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f6ccc5d8420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f6ccc0a500b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f6ccc084859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007f6ccc084729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007f6ccc095fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x0000558eec6e87a1 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x77497a1)
 #9 0x0000558ee90d330b (anonymous namespace)::X86_64ABIInfo::classify(clang::QualType, unsigned long, (anonymous namespace)::X86_64ABIInfo::Class&, (anonymous namespace)::X86_64ABIInfo::Class&, bool, bool) const X86.cpp:0:0
#10 0x0000558ee90d4472 (anonymous namespace)::X86_64ABIInfo::classifyArgumentType(clang::QualType, unsigned int, unsigned int&, unsigned int&, bool, bool) const X86.cpp:0:0
#11 0x0000558ee90d70ac (anonymous namespace)::X86_64ABIInfo::computeInfo(clang::CodeGen::CGFunctionInfo&) const X86.cpp:0:0
#12 0x0000558ee9256685 clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>, bool, bool, llvm::ArrayRef<clang::CanQual<clang::Type>>, clang::FunctionType::ExtInfo, llvm::ArrayRef<clang::FunctionType::ExtParameterInfo>, clang::CodeGen::RequiredArgs) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x42b7685)
#13 0x0000558ee9259f46 arrangeLLVMFunctionInfo(clang::CodeGen::CodeGenTypes&, bool, llvm::SmallVectorImpl<clang::CanQual<clang::Type>>&, clang::CanQual<clang::FunctionProtoType>) CGCall.cpp:0:0
#14 0x0000558ee925e3b7 clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(clang::FunctionDecl const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x42bf3b7)
#15 0x0000558ee8ffab72 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x405bb72)
#16 0x0000558ee8ff5cb5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4056cb5)
#17 0x0000558ee8ff6888 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4057888)
#18 0x0000558ee8fff6d3 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0
#19 0x0000558ee9e6bf26 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0
#20 0x0000558ee9e5dfd0 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4ebefd0)
#21 0x0000558eeb367884 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63c8884)
#22 0x0000558ee9e68e08 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4ec9e08)
#23 0x0000558ee96b39e9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47149e9)
#24 0x0000558ee9639606 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x469a606)
#25 0x0000558ee9797ea6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47f8ea6)
#26 0x0000558ee609406d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10f506d)
#27 0x0000558ee608fd6a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#28 0x0000558ee9499d0d void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#29 0x0000558ee8b35b10 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b96b10)
#30 0x0000558ee949a32f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#31 0x0000558ee946149c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44c249c)
#32 0x0000558ee9461f2d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44c2f2d)
#33 0x0000558ee946a00d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44cb00d)
#34 0x0000558ee60922ca clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10f32ca)
#35 0x0000558ee5f985b5 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xff95b5)
#36 0x00007f6ccc086083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#37 0x0000558ee608ab4e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10ebb4e)
aganea commented 1 year ago

This also reproduces when building C-reduce with the 17.0 branch or ToT, simply by following the steps here: https://github.com/zjturner/creduce-windows

Assertion failed: !D->isInvalidDecl() && "Cannot get layout of invalid decl!", file C:\git\llvm-project\clang\lib\AST\RecordLayoutBuilder.cpp, line 3295
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: c:\\git\\llvm-project\\stage1_creduce\\bin\\clang-cl.exe /nologo -TP -DHAVE_CONFIG_H -DNDEBUG -IC:\\git\\creduce-build -IC:\\git\\creduce\\clang_delta -IC:\\git\\llvm-project\\llvm\\include -IC:\\git\\llvm-project\\stage1_creduce\\include -IC:\\git\\llvm-project\\clang\\include -IC:\\git\\llvm-project\\stage1_creduce\\tools\\clang\\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc -std=c++11 -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wno-long-long -Wno-unused-parameter -Wno-missing-field-initializers /MD /O2 /Ob2 /DNDEBUG -O3 -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_HARDENED_MODE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DUNICODE -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /showIncludes /Foclang_delta\\CMakeFiles\\clang_delta.dir\\RenameParam.cpp.obj /Fdclang_delta\\CMakeFiles\\clang_delta.dir\\ -c -- C:\\git\\creduce\\clang_delta\\RenameParam.cpp
1.      C:\git\llvm-project\clang\include\clang/AST/DeclBase.h:684:23: current parser token '-'
2.      C:\git\llvm-project\clang\include\clang/AST/DeclBase.h:40:1: parsing namespace 'clang'
3.      C:\git\llvm-project\clang\include\clang/AST/DeclBase.h:83:1: parsing struct/union/class body 'clang::Decl'
4.      C:\git\llvm-project\clang\include\clang/AST/DeclBase.h:682:39: parsing function body 'clang::Decl::setOwningModuleID'
5.      C:\git\llvm-project\clang\include\clang/AST/DeclBase.h:682:39: in compound statement ('{}')
Exception Code: 0x80000003
 #0 0x00007ff770293b55 HandleAbort C:\git\llvm-project\llvm\lib\Support\Windows\Signals.inc:419:0
 #1 0x00007ffb60f41881 (C:\Windows\System32\ucrtbase.dll+0x71881)
 #2 0x00007ffb60f42851 (C:\Windows\System32\ucrtbase.dll+0x72851)
 #3 0x00007ffb60f441b5 (C:\Windows\System32\ucrtbase.dll+0x741b5)
 #4 0x00007ffb60f444f1 (C:\Windows\System32\ucrtbase.dll+0x744f1)
 #5 0x00007ff773add863 clang::TagDecl::isCompleteDefinition C:\git\llvm-project\clang\include\clang\AST\Decl.h:3572:0
 #6 0x00007ff773add863 clang::ASTContext::getASTRecordLayout(class clang::RecordDecl const *) const C:\git\llvm-project\clang\lib\AST\RecordLayoutBuilder.cpp:3296:0
 #7 0x00007ff77355e6d6 getBaseAlignmentAndOffsetFromPtr C:\git\llvm-project\clang\lib\Sema\SemaChecking.cpp:16908:0
 #8 0x00007ff77356039e getPresumedAlignmentOfPointer C:\git\llvm-project\clang\lib\Sema\SemaChecking.cpp:16945:0
 #9 0x00007ff773502697 clang::CharUnits::operator>= C:\git\llvm-project\clang\include\clang\AST\CharUnits.h:116:0
#10 0x00007ff773502697 clang::Sema::CheckCastAlign(class clang::Expr *, class clang::QualType, class clang::SourceRange) C:\git\llvm-project\clang\lib\Sema\SemaChecking.cpp:16987:0
#11 0x00007ff773364303 `anonymous namespace'::CastOperation::CheckCXXCStyleCast C:\git\llvm-project\clang\lib\Sema\SemaCast.cpp:2862:0
#12 0x00007ff773360aa5 clang::Sema::BuildCStyleCastExpr(class clang::SourceLocation, class clang::TypeSourceInfo *, class clang::SourceLocation, class clang::Expr *) C:\git\llvm-project\clang\lib\Sema\SemaCast.cpp:3342:0
#13 0x00007ff772b94bbf clang::Sema::ActOnCastExpr(class clang::Scope *, class clang::SourceLocation, class clang::Declarator &, class clang::OpaquePtr<class clang::QualType> &, class clang::SourceLocation, class clang::Expr *) C:\git\llvm-project\clang\lib\Sema\SemaExpr.cpp:8452:0
#14 0x00007ff7728906af clang::GreaterThanIsOperatorScope::{dtor} C:\git\llvm-project\clang\include\clang\Parse\RAIIObjectsForParser.h:324:0
#15 0x00007ff7728906af clang::Parser::ParseParenExpression(enum clang::Parser::ParenParseOption &, bool, bool, class clang::OpaquePtr<class clang::QualType> &, class clang::SourceLocation &) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:3225:0
#16 0x00007ff7728887ff clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, bool &, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:961:0
#17 0x00007ff77288cd23 clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:689:0
#18 0x00007ff772885b80 clang::Parser::ParseAssignmentExpression(enum clang::Parser::TypeCastState) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:178:0
#19 0x00007ff77288e1fa clang::Parser::ParseExpression(enum clang::Parser::TypeCastState) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:127:0
#20 0x00007ff772890e21 clang::Parser::ParseParenExpression(enum clang::Parser::ParenParseOption &, bool, bool, class clang::OpaquePtr<class clang::QualType> &, class clang::SourceLocation &) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:3197:0
#21 0x00007ff7728887ff clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, bool &, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:961:0
#22 0x00007ff77288cd23 clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:689:0
#23 0x00007ff772888dbb clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, bool &, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:1402:0
#24 0x00007ff77288cd23 clang::Parser::ParseCastExpression(enum clang::Parser::CastParseKind, bool, enum clang::Parser::TypeCastState, bool, bool *) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:689:0
#25 0x00007ff772885b80 clang::Parser::ParseAssignmentExpression(enum clang::Parser::TypeCastState) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:178:0
#26 0x00007ff77288e1fa clang::Parser::ParseExpression(enum clang::Parser::TypeCastState) C:\git\llvm-project\clang\lib\Parse\ParseExpr.cpp:127:0
#27 0x00007ff7728b09b2 clang::ActionResult<clang::Expr *,1>::isInvalid C:\git\llvm-project\clang\include\clang\Sema\Ownership.h:207:0
#28 0x00007ff7728b09b2 clang::Parser::ParseExprStatement(enum clang::Parser::ParsedStmtContext) C:\git\llvm-project\clang\lib\Parse\ParseStmt.cpp:531:0
#29 0x00007ff7728b7bdd clang::Parser::ParseStatementOrDeclarationAfterAttributes(class llvm::SmallVector<class clang::Stmt *, 32> &, enum clang::Parser::ParsedStmtContext, class clang::SourceLocation *, class clang::ParsedAttributes &, class clang::ParsedAttributes &) C:\git\llvm-project\clang\lib\Parse\ParseStmt.cpp:279:0
#30 0x00007ff7728b6a42 clang::Parser::ParseStatementOrDeclaration(class llvm::SmallVector<class clang::Stmt *, 32> &, enum clang::Parser::ParsedStmtContext, class clang::SourceLocation *) C:\git\llvm-project\clang\lib\Parse\ParseStmt.cpp:119:0
#31 0x00007ff7728af152 clang::Parser::ParseCompoundStatementBody(bool) C:\git\llvm-project\clang\lib\Parse\ParseStmt.cpp:1205:0
#32 0x00007ff7728b2a81 clang::ActionResult<clang::Stmt *,1>::isInvalid C:\git\llvm-project\clang\include\clang\Sema\Ownership.h:207:0
#33 0x00007ff7728b2a81 clang::Parser::ParseFunctionStatementBody(class clang::Decl *, class clang::Parser::ParseScope &) C:\git\llvm-project\clang\lib\Parse\ParseStmt.cpp:2470:0
#34 0x00007ff77286e774 clang::Token::isNot C:\git\llvm-project\clang\include\clang\Lex\Token.h:99:0
#35 0x00007ff77286e774 clang::Parser::ParseLexedMethodDef(struct clang::Parser::LexedMethod &) C:\git\llvm-project\clang\lib\Parse\ParseCXXInlineMethods.cpp:600:0
#36 0x00007ff77286ed49 clang::Parser::ParseLexedMethodDefs(struct clang::Parser::ParsingClass &) C:\git\llvm-project\clang\lib\Parse\ParseCXXInlineMethods.cpp:530:0
#37 0x00007ff7728cb024 clang::Parser::ParseCXXMemberSpecification(class clang::SourceLocation, class clang::SourceLocation, class clang::ParsedAttributes &, unsigned int, class clang::Decl *) C:\git\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:3673:0
#38 0x00007ff7728cd6ab clang::Parser::ParseClassSpecifier(enum clang::tok::TokenKind, class clang::SourceLocation, class clang::DeclSpec &, struct clang::Parser::ParsedTemplateInfo const &, enum clang::AccessSpecifier, bool, enum clang::Parser::DeclSpecContext, class clang::ParsedAttributes &) C:\git\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:2139:0
#39 0x00007ff77283d641 llvm::SmallVectorBase<unsigned int>::empty C:\git\llvm-project\llvm\include\llvm\ADT\SmallVector.h:94:0
#40 0x00007ff77283d641 clang::ParsedAttributesView::empty C:\git\llvm-project\clang\include\clang\Sema\ParsedAttr.h:819:0
#41 0x00007ff77283d641 clang::Parser::ParseDeclarationSpecifiers(class clang::DeclSpec &, struct clang::Parser::ParsedTemplateInfo const &, enum clang::AccessSpecifier, enum clang::Parser::DeclSpecContext, class clang::Parser::LateParsedAttrList *, enum clang::ImplicitTypenameContext) C:\git\llvm-project\clang\lib\Parse\ParseDecl.cpp:4323:0
#42 0x00007ff7728077e7 clang::Parser::ParseDeclOrFunctionDefInternal(class clang::ParsedAttributes &, class clang::ParsedAttributes &, class clang::ParsingDeclSpec &, enum clang::AccessSpecifier) C:\git\llvm-project\clang\lib\Parse\Parser.cpp:1123:0
#43 0x00007ff772808141 llvm::SaveAndRestore<bool>::{dtor} C:\git\llvm-project\llvm\include\llvm\Support\SaveAndRestore.h:29:0
#44 0x00007ff772808141 clang::Parser::ObjCDeclContextSwitch::{dtor} C:\git\llvm-project\clang\include\clang\Parse\Parser.h:1046:0
#45 0x00007ff772808141 clang::Parser::ParseDeclarationOrFunctionDefinition(class clang::ParsedAttributes &, class clang::ParsedAttributes &, class clang::ParsingDeclSpec *, enum clang::AccessSpecifier) C:\git\llvm-project\clang\lib\Parse\Parser.cpp:1225:0
#46 0x00007ff772808d9a clang::Parser::ParseExternalDeclaration(class clang::ParsedAttributes &, class clang::ParsedAttributes &, class clang::ParsingDeclSpec *) C:\git\llvm-project\clang\lib\Parse\Parser.cpp:1045:0
#47 0x00007ff7728d0074 clang::AttributePool::{dtor} C:\git\llvm-project\clang\include\clang\Sema\ParsedAttr.h:704:0
#48 0x00007ff7728d0074 clang::Parser::ParseInnerNamespace(class llvm::SmallVector<struct clang::Parser::InnerNamespaceInfo, 4> const &, unsigned int, class clang::SourceLocation &, class clang::ParsedAttributes &, class clang::BalancedDelimiterTracker &) C:\git\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:263:0
#49 0x00007ff7728d4866 clang::Parser::ParseScope::Exit C:\git\llvm-project\clang\include\clang\Parse\Parser.h:1143:0
#50 0x00007ff7728d4866 clang::Parser::ParseNamespace(enum clang::DeclaratorContext, class clang::SourceLocation &, class clang::SourceLocation) C:\git\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:242:0
#51 0x00007ff7728393b9 clang::Parser::ParseDeclaration(enum clang::DeclaratorContext, class clang::SourceLocation &, class clang::ParsedAttributes &, class clang::ParsedAttributes &, class clang::SourceLocation *) C:\git\llvm-project\clang\lib\Parse\ParseDecl.cpp:1888:0
#52 0x00007ff772808cb2 clang::Parser::ParseExternalDeclaration(class clang::ParsedAttributes &, class clang::ParsedAttributes &, class clang::ParsingDeclSpec *) C:\git\llvm-project\clang\lib\Parse\Parser.cpp:1045:0
#53 0x00007ff77280dec0 clang::Parser::ParseTopLevelDecl(class clang::OpaquePtr<class clang::DeclGroupRef> &, enum clang::Sema::ModuleImportState &) C:\git\llvm-project\clang\lib\Parse\Parser.cpp:742:0
#54 0x00007ff772801fe6 clang::ParseAST(class clang::Sema &, bool, bool) C:\git\llvm-project\clang\lib\Parse\ParseAST.cpp:163:0
#55 0x00007ff7710b88c1 clang::ASTFrontendAction::ExecuteAction(void) C:\git\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1173:0
#56 0x00007ff774fe2cec clang::CodeGenAction::ExecuteAction(void) C:\git\llvm-project\clang\lib\CodeGen\CodeGenAction.cpp:1208:0
#57 0x00007ff7710b8648 clang::FrontendAction::Execute(void) C:\git\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1063:0
#58 0x00007ff77106a6c8 llvm::Error::getPtr C:\git\llvm-project\llvm\include\llvm\Support\Error.h:269:0
#59 0x00007ff77106a6c8 llvm::Error::operator bool C:\git\llvm-project\llvm\include\llvm\Support\Error.h:233:0
#60 0x00007ff77106a6c8 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) C:\git\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:1053:0
#61 0x00007ff771187b0b clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) C:\git\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:272:0
#62 0x00007ff76ecf6213 cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) C:\git\llvm-project\clang\tools\driver\cc1_main.cpp:249:0
#63 0x00007ff76eceef7b ExecuteCC1Tool C:\git\llvm-project\clang\tools\driver\driver.cpp:375:0
#64 0x00007ff770f3a7a1 clang::driver::CC1Command::Execute::__l7::<lambda_1>::operator() C:\git\llvm-project\clang\lib\Driver\Job.cpp:440:0
#65 0x00007ff770f3a7a1 llvm::function_ref<void __cdecl(void)>::callback_fn<`clang::driver::CC1Command::Execute'::`7'::<lambda_1> > C:\git\llvm-project\llvm\include\llvm\ADT\STLFunctionalExtras.h:45:0
#66 0x00007ff7702796aa llvm::CrashRecoveryContext::RunSafely(class llvm::function_ref<(void)>) C:\git\llvm-project\llvm\lib\Support\CrashRecoveryContext.cpp:235:0
#67 0x00007ff770f3b14b clang::driver::CC1Command::Execute(class llvm::ArrayRef<class std::optional<class llvm::StringRef>>, class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> *, bool *) const C:\git\llvm-project\clang\lib\Driver\Job.cpp:440:0
#68 0x00007ff770e58586 std::_Func_class<void,clang::driver::Command const &,int>::_Empty C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\include\functional:897:0
#69 0x00007ff770e58586 std::function<void __cdecl(clang::driver::Command const &,int)>::operator bool C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\include\functional:1127:0
#70 0x00007ff770e58586 clang::driver::Compilation::ExecuteCommand(class clang::driver::Command const &, class clang::driver::Command const *&, bool) const C:\git\llvm-project\clang\lib\Driver\Compilation.cpp:200:0
#71 0x00007ff770e588bf clang::driver::Compilation::ExecuteJobs(class clang::driver::JobList const &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &, bool) const C:\git\llvm-project\clang\lib\Driver\Compilation.cpp:253:0
#72 0x00007ff770e32379 llvm::SmallVectorBase<unsigned int>::empty C:\git\llvm-project\llvm\include\llvm\ADT\SmallVector.h:94:0
#73 0x00007ff770e32379 clang::driver::Driver::ExecuteCompilation(class clang::driver::Compilation &, class llvm::SmallVectorImpl<struct std::pair<int, class clang::driver::Command const *>> &) C:\git\llvm-project\clang\lib\Driver\Driver.cpp:1906:0
#74 0x00007ff76ecf2079 clang_main(int, char **, struct llvm::ToolContext const &) C:\git\llvm-project\clang\tools\driver\driver.cpp:544:0
#75 0x00007ff76ed039a4 main C:\git\llvm-project\stage1_creduce\tools\clang\tools\driver\clang-driver.cpp:16:0
#76 0x00007ff7744dfa38 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78:0
#77 0x00007ff7744dfa38 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#78 0x00007ffb62a37614 (C:\Windows\System32\KERNEL32.DLL+0x17614)
#79 0x00007ffb632e26b1 (C:\Windows\SYSTEM32\ntdll.dll+0x526b1)
clang-cl: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 17.0.0 (https://github.com/llvm/llvm-project.git 092b6c5ee3707ea10b9f10d0a674e8d12395369b)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: c:\git\llvm-project\stage1_creduce\bin