llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

clang (inline-asm): assertion `NumBits >= MIN_INT_BITS && "bitwidth too small"' failed.

Open llvmbot opened this issue 4 years ago • 2 comments

Bugzilla Link 49256
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @chengniansun,@zygoloid

Extended Description

Actually, I am not sure how important such assertion failure/segment faults caused by invalid inline-asm are. It may not be that important as other cases. So I will mark all my inline-asm-relevant bugs as enhancement.

Following code trigger an assertion failure on 11.0, 12.0, and trunk.

$ cat /tmp/test-845692.c
# 1 "<built-in>"
# 1 "test.c"
int a[];

int main() {
    asm("xor %%eax, %%eax;\n"
        "mov %%eax, %0;\n"
        : "=r"(a));
}


$ cat /tmp/test-845692.sh
# Crash reproducer for clang version 13.0.0 (https://github.com/llvm/llvm-project.git b006902b2dfac792e8ade73798ca1b216654faf7)
# Driver args: "-o" "/tmp/a.out" "-x" "c" "-c" "test.c"
# Original command:  "/data/xxx/git/llvm-project/build_trunk/bin/clang-13" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "--mrelax-relocations" "-disable-free" "-main-file-name" "test.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-resource-dir" "/data/xxx/git/llvm-project/build_trunk/lib/clang/13.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/data/xxx/git/llvm-project/build_trunk/lib/clang/13.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/xxx/data/docker_share/clang" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-faddrsig" "-o" "/tmp/a.out" "-x" "c" "test.c"
 "/data/xxx/git/llvm-project/build_trunk/bin/clang-13" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "--mrelax-relocations" "-disable-free" "-main-file-name" "test.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/xxx/data/docker_share/clang" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-faddrsig" "-x" "c" "test-845692.c"


$ ./clang -o /tmp/a.out -x c -c test.c
clang: /home/xxx/data/git/llvm-project/llvm/lib/IR/Type.cpp:270: static llvm::IntegerType *llvm::IntegerType::get(llvm::LLVMContext &, unsigned int): Assertion `NumBits >= MIN_INT_BITS && "bitwidth too small"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /data/xxx/git/llvm-project/build_trunk/bin/clang -o /tmp/a.out -x c -c test.c
1.      <eof> parser at end of file
2.      test.c:3:5: LLVM IR generation of declaration 'main'
3.      test.c:3:5: Generating code for declaration 'main'
 #0 0x0000000000dfd0a1 __interceptor_backtrace.part.117 asan_interceptors.cc.o:0:0
 #1 0x000000000d7fb43a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/xxx/data/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:561:7
 #2 0x000000000d7f1bc1 llvm::sys::RunSignalHandlers() /home/xxx/data/git/llvm-project/llvm/lib/Support/Signals.cpp:72:18
 #3 0x000000000d7f805f llvm::sys::CleanupOnSignal(unsigned long) /home/xxx/data/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
 #4 0x000000000d504245 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/xxx/data/git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:75:5
 #5 0x000000000d504d0c CrashRecoverySignalHandler(int) /home/xxx/data/git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:389:1
 #6 0x00007fe7aeee68a0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
 #7 0x00007fe7ae909f47 raise /build/glibc-2ORdQG/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #8 0x00007fe7ae90b8b1 abort /build/glibc-2ORdQG/glibc-2.27/stdlib/abort.c:81:0
 #9 0x00007fe7ae8fb42a __assert_fail_base /build/glibc-2ORdQG/glibc-2.27/assert/assert.c:89:0
#10 0x00007fe7ae8fb4a2 (/lib/x86_64-linux-gnu/libc.so.6+0x304a2)
#11 0x000000000ad36a7b llvm::IntegerType::get(llvm::LLVMContext&, unsigned int) /home/xxx/data/git/llvm-project/llvm/lib/IR/Type.cpp:0:3
#12 0x000000000e89b5b6 clang::CodeGen::CodeGenFunction::EmitAsmStmt(clang::AsmStmt const&) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CGStmt.cpp:0:30
#13 0x000000000e87e69f clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CGStmt.cpp:154:32
#14 0x000000000e8ad262 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CGStmt.cpp:479:7
#15 0x000000000eac34d5 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1184:5
#16 0x000000000eac6f54 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1364:7
#17 0x000000000eb82ddc clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4697:3
#18 0x000000000eb5961e clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:0:12
#19 0x000000000eb704e4 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2844:5
#20 0x000000000eb91c22 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:5515:5
#21 0x0000000012d1d30c (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:169:35
#22 0x0000000012d0c741 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:220:11
#23 0x00000000183047b2 clang::ParseAST(clang::Sema&, bool, bool) /home/xxx/data/git/llvm-project/clang/lib/Parse/ParseAST.cpp:162:11
#24 0x00000000105c90c3 clang::ASTFrontendAction::ExecuteAction() /home/xxx/data/git/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1058:1
#25 0x0000000012cff7d9 clang::CodeGenAction::ExecuteAction() /home/xxx/data/git/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1082:30
#26 0x00000000105c5efd clang::FrontendAction::Execute() /home/xxx/data/git/llvm-project/clang/lib/Frontend/FrontendAction.cpp:0:8
#27 0x0000000010394e0a llvm::Error::operator bool() /home/xxx/data/git/llvm-project/llvm/include/llvm/Support/Error.h:0:0
#28 0x0000000010394e0a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/xxx/data/git/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:949:0
#29 0x0000000010ac5a2e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/xxx/data/git/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:25
#30 0x0000000000e9b85d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/xxx/data/git/llvm-project/clang/tools/driver/cc1_main.cpp:246:15
#31 0x0000000000e82e17 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /home/xxx/data/git/llvm-project/clang/tools/driver/driver.cpp:330:12
#32 0x000000000ff0a39d clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1::operator()() const /home/xxx/data/git/llvm-project/clang/lib/Driver/Job.cpp:404:30
#33 0x000000000ff0a39d void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1>(long) /home/xxx/data/git/llvm-project/llvm/include/llvm/ADT/STLExtras.h:185:0
#34 0x000000000d503de4 llvm::function_ref<void ()>::operator()() const /home/xxx/data/git/llvm-project/llvm/include/llvm/ADT/STLExtras.h:209:12
#35 0x000000000d503de4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/xxx/data/git/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:424:0
#36 0x000000000ff08be2 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const /home/xxx/data/git/llvm-project/clang/lib/Driver/Job.cpp:404:7
#37 0x000000000fdfc32e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const /home/xxx/data/git/llvm-project/clang/lib/Driver/Compilation.cpp:195:15
#38 0x000000000fdfcf7c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const /home/xxx/data/git/llvm-project/clang/lib/Driver/Compilation.cpp:248:19
#39 0x000000000fe6126a llvm::SmallVectorBase<unsigned int>::empty() const /home/xxx/data/git/llvm-project/llvm/include/llvm/ADT/SmallVector.h:0:0
#40 0x000000000fe6126a clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /home/xxx/data/git/llvm-project/clang/lib/Driver/Driver.cpp:1529:0
#41 0x0000000000e7fd4f main /home/xxx/data/git/llvm-project/clang/tools/driver/driver.cpp:502:21
#42 0x00007fe7ae8ecb97 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344:0
#43 0x0000000000d7aada _start (/data/xxx/git/llvm-project/build_trunk/bin/clang+0xd7aada)
clang-13: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git b006902b2dfac792e8ade73798ca1b216654faf7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /data/xxx/git/llvm-project/build_trunk/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/test-845692.c
clang-13: note: diagnostic msg: /tmp/test-845692.sh
clang-13: note: diagnostic msg:

********************

llvmbot avatar Feb 19 '21 00:02 llvmbot

A possible duplicate.

$ clang-trunk -v clang version 13.0.0 (https://github.com/llvm/llvm-project.git 24d48d45cc302a6abeab139d87ba87f7a2335323) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/cnsun/usr/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64

$ cat mutant.c foo(x) { int var[x]; asm("" : "+r"(var)); }

$ clang-trunk mutant.c mutant.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] foo(x) { ^ mutant.c:4:1: warning: non-void function does not return a value [-Wreturn-type] } ^ clang-13: /tmp/tmp.nPuVKAIgXI-clang-builder/llvm-project/llvm/lib/IR/Type.cpp:270: static llvm::IntegerType* llvm::IntegerType::get(llvm::LLVMContext&, unsigned int): Assertion `NumBits >= MIN_INT_BITS && "bitwidth too small"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /scratch/software/clang-trunk/bin/clang-13 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -main-file-name mutant.c -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210624_130549_04d8/delta/perses_result -resource-dir /scratch/software/clang-trunk/lib/clang/13.0.0 -c-isystem . -c-isystem /usr/local/include/cmsith -internal-isystem /scratch/software/clang-trunk/lib/clang/13.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210624_130549_04d8/delta/perses_result -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/mutant-1b4998.o -x c mutant.c

  1. parser at end of file
  2. mutant.c:1:1: LLVM IR generation of declaration 'foo'
  3. mutant.c:1:1: Generating code for declaration 'foo' #​0 0x0000558056159274 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0 #​1 0x0000558056156a2e SignalHandler(int) Signals.cpp:0:0 #​2 0x00007f0635ccc3c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0) #​3 0x00007f063576b18b raise /build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1 #​4 0x00007f063574a859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7 #​5 0x00007f063574a729 get_sysdep_segment_value /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8 #​6 0x00007f063574a729 _nl_load_domain /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34 #​7 0x00007f063575bf36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36) #​8 0x00005580558a8db2 llvm::IntegerType::get(llvm::LLVMContext&, unsigned int) (/scratch/software/clang-trunk/bin/clang-13+0x309fdb2) #​9 0x00005580564e3b5a clang::CodeGen::CodeGenFunction::EmitAsmStmt(clang::AsmStmt const&) (/scratch/software/clang-trunk/bin/clang-13+0x3cdab5a) #​10 0x00005580564e83ab clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/scratch/software/clang-trunk/bin/clang-13+0x3cdf3ab) #​11 0x00005580564ee5dc clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/scratch/software/clang-trunk/bin/clang-13+0x3ce55dc) #​12 0x0000558056545a21 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/scratch/software/clang-trunk/bin/clang-13+0x3d3ca21) #​13 0x000055805655727c clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/scratch/software/clang-trunk/bin/clang-13+0x3d4e27c) #​14 0x00005580565b0b86 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/scratch/software/clang-trunk/bin/clang-13+0x3da7b86) #​15 0x00005580565ac725 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/scratch/software/clang-trunk/bin/clang-13+0x3da3725) #​16 0x00005580565acb8b clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/scratch/software/clang-trunk/bin/clang-13+0x3da3b8b) #​17 0x00005580565b55f2 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0 #​18 0x00005580572b8e19 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0 #​19 0x00005580572ab000 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/scratch/software/clang-trunk/bin/clang-13+0x4aa2000) #​20 0x000055805836ec24 clang::ParseAST(clang::Sema&, bool, bool) (/scratch/software/clang-trunk/bin/clang-13+0x5b65c24) #​21 0x00005580572b5f98 clang::CodeGenAction::ExecuteAction() (/scratch/software/clang-trunk/bin/clang-13+0x4aacf98) #​22 0x0000558056b64e79 clang::FrontendAction::Execute() (/scratch/software/clang-trunk/bin/clang-13+0x435be79) #​23 0x0000558056af80c6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/scratch/software/clang-trunk/bin/clang-13+0x42ef0c6) #​24 0x0000558056c42d00 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/scratch/software/clang-trunk/bin/clang-13+0x4439d00) #​25 0x0000558053a69b06 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/scratch/software/clang-trunk/bin/clang-13+0x1260b06) #​26 0x0000558053a65e48 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0 #​27 0x00005580539930c6 main (/scratch/software/clang-trunk/bin/clang-13+0x118a0c6) #​28 0x00007f063574c0b3 __libc_start_main /build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3 #​29 0x0000558053a659be _start (/scratch/software/clang-trunk/bin/clang-13+0x125c9be) clang-13: error: unable to execute command: Aborted (core dumped) clang-13: error: clang frontend command failed due to signal (use -v to see invocation) clang version 13.0.0 (https://github.com/llvm/llvm-project.git 24d48d45cc302a6abeab139d87ba87f7a2335323) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/cnsun/usr/bin clang-13: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-13: note: diagnostic msg: /tmp/mutant-1eb0a7.c clang-13: note: diagnostic msg: /tmp/mutant-1eb0a7.sh clang-13: note: diagnostic msg:


chengniansun avatar Jun 24 '21 22:06 chengniansun

@llvm/issue-subscribers-clang-codegen

llvmbot avatar Jun 27 '23 18:06 llvmbot

The second test case by @chengniansun appears to be fixed in Clang 13: https://godbolt.org/z/f1P9x8368 The original test case is still crashing as of post-17 trunk: https://godbolt.org/z/MTKofhx3a

clang++: /root/llvm-project/llvm/lib/IR/Type.cpp:334:
static llvm::IntegerType* llvm::IntegerType::get(llvm::LLVMContext&, unsigned int):
Assertion `NumBits >= MIN_INT_BITS && "bitwidth too small"' failed.

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: /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 -Wno-implicit-int -Wno-implicit-function-declaration <source>
1.	<eof> parser at end of file
2.	<source>:3:5: LLVM IR generation of declaration 'main'
3.	<source>:3:5: Generating code for declaration 'main'
 #0 0x0000000003673648 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3673648)
 #1 0x00000000036714cc llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36714cc)
 #2 0x00000000035bed28 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007ff898ab2420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007ff89857500b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007ff898554859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007ff898554729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007ff898565fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x000000000306dfe8 llvm::IntegerType::get(llvm::LLVMContext&, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x306dfe8)
 #9 0x0000000003984a70 clang::CodeGen::CodeGenFunction::EmitAsmStmt(clang::AsmStmt const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3984a70)
#10 0x000000000398939b clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x398939b)
#11 0x000000000398f6ac clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x398f6ac)
#12 0x00000000039ece76 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x39ece76)
#13 0x00000000039fff6a clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x39fff6a)
#14 0x0000000003a612cd clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a612cd)
#15 0x0000000003a5c485 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a5c485)
#16 0x0000000003a5ca43 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a5ca43)
#17 0x0000000003a65c13 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0
#18 0x00000000048c8056 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0
#19 0x00000000048ba7f8 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x48ba7f8)
#20 0x0000000005d7fce4 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x5d7fce4)
#21 0x00000000048c50c8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x48c50c8)
#22 0x000000000412d7d9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x412d7d9)
#23 0x00000000040b1b6e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x40b1b6e)
#24 0x000000000420da46 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x420da46)
#25 0x0000000000bcb732 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbcb732)
#26 0x0000000000bc3f1a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#27 0x0000000003f11a19 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
#28 0x00000000035bf1d4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x35bf1d4)
#29 0x0000000003f1200f 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
#30 0x0000000003ed9f75 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ed9f75)
#31 0x0000000003eda9dd 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+++0x3eda9dd)
#32 0x0000000003ee2505 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ee2505)
#33 0x0000000000bc99e7 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbc99e7)
#34 0x0000000000ac3ab1 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xac3ab1)
#35 0x00007ff898556083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#36 0x0000000000bc39fe _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbc39fe)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)

Endilll avatar Aug 07 '23 19:08 Endilll