<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115655>115655</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-20 crashed with vector_size attribute in struct. huge 'byval' arguments are unsupported.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
iamanonymouscs
</td>
</tr>
</table>
<pre>
clang-20 crashed with ```vector_size``` attribute in struct.
While GCC accepts this code.
Compiler explorer: https://godbolt.org/z/54PGhTfK4
```
$cat mutant.c
typedef struct {
__attribute__((vector_size(32))) char a[1073741824];
} b;
void c(b d) {}
$clang-20 mutant.c
huge 'byval' arguments are unsupported
ptr @c
fatal error: error in backend: Broken module found, compilation aborted!
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 -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. Optimizer
3. Running pass "verify" on module "<source>"
#0 0x0000000003bfc118 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3bfc118)
#1 0x0000000003bf9e1c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3bf9e1c)
#2 0x0000000003b47986 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b47986)
#3 0x0000000003bf113e llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3bf113e)
#4 0x0000000000ce80a0 LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#5 0x0000000003b529f3 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b529f3)
#6 0x0000000003b52b58 (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b52b58)
#7 0x00000000035e1190 llvm::VerifierPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x35e1190)
#8 0x0000000003e97cae llvm::detail::PassModel<llvm::Module, llvm::VerifierPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e97cae)
#9 0x00000000035afdd0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x35afdd0)
#10 0x0000000003ea8dab (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#11 0x0000000003eac5d5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3eac5d5)
#12 0x0000000004577fce clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4577fce)
#13 0x000000000672463c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x672463c)
#14 0x00000000045783b8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x45783b8)
#15 0x0000000004833519 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4833519)
#16 0x00000000047b278e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x47b278e)
#17 0x000000000491931e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x491931e)
#18 0x0000000000cea5af cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcea5af)
#19 0x0000000000ce226a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#20 0x00000000045bb5b9 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
#21 0x0000000003b478c4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b478c4)
#22 0x00000000045bbbaf 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
#23 0x0000000004581e9d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4581e9d)
#24 0x0000000004582f8d 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+0x4582f8d)
#25 0x000000000458a345 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x458a345)
#26 0x0000000000ce7449 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xce7449)
#27 0x0000000000bb3b54 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xbb3b54)
#28 0x00007d0a1fc29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#29 0x00007d0a1fc29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#30 0x0000000000ce1d1e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xce1d1e)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
```
It can be compiled without ```vector_size``` attribute.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWsFy2zjSfhr4gpKKBEmRPPigyNZM5k9qXLFn_qMKBJsSNiTABUBZmqffAkhJBCMnnl3NbtVuykksEOj--utGd4MQ1ZpvBcA9Sj6g5OGOdmYn1T2nDRVSHBvZaabvClke71lNxXZGAswU1Tso8Ss3O4wWQf-zB2ak2mj-B5zHMDVG8aIzgLnA2qiOmTkKHlCw_P8drwH_tFphyhi0RmOz4xozWcIwo_93JZuW16AwHNpaKlAoWuKdMa1G0RKRNSLrrSwLWZu5VFtE1n8gsk7ip592L9X_xWNJZ1TDRxIzanDTGSrMnPWD5thCCdUAFaP0Qz-O8WZztmWzQSRDJBtbTLKIIJL3P5jtqMIUJR_CII3SOMxIjJIHFA3SUPqAi_OnveQlZohkBS7tYqs0ffCQk_hMvo93120BI5IWxz2tEUkxVduuAWE0pgpwJ3TXtlIZKPv5rVEYxcGwuqKG1hiUko5V94t1VEHZVxClHfug5FcQuJFlVwOuZCdKRFaYOa9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