<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64056>64056</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[NVPTX] v32i1 global causes "double free or corruption (out)"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
oakrc
</td>
</tr>
</table>
<pre>
[Demo on Compiler Explorer](https://godbolt.org/z/1Mz3hG9jb)
Code:
```
@G = global <32 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
```
Stack dump:
```
double free or corruption (out)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -march=nvptx <source>
#0 0x0000000002fbf268 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2fbf268)
#1 0x0000000002fbce2c SignalHandler(int) Signals.cpp:0:0
#2 0x00007fb9858bd420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007fb98538000b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007fb98535f859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x00007fb9853ca26e (/lib/x86_64-linux-gnu/libc.so.6+0x8d26e)
#6 0x00007fb9853d22fc (/lib/x86_64-linux-gnu/libc.so.6+0x952fc)
#7 0x00007fb9853d3fa0 (/lib/x86_64-linux-gnu/libc.so.6+0x96fa0)
#8 0x00000000028a5659 llvm::Module::~Module() (/opt/compiler-explorer/clang-trunk/bin/llc+0x28a5659)
#9 0x0000000000764d08 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#10 0x00000000006a8e7a main (/opt/compiler-explorer/clang-trunk/bin/llc+0x6a8e7a)
#11 0x00007fb985361083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#12 0x000000000075eede _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x75eede)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVktv4zYQ_jX0ZWCDGup58MHrR1pgtwiQxaI3g6IomxuJFPhInD30txeUnYfSLpBsemygyKQofvONvhnOcOfUQUu5JNknkm1mPPijsUvDb62Y1aZ5iAsb2RswGtamH1QnLWxPQ2estCTbECyP3g-OsBXBHcHdwTS16fzC2APB3Q-Cu-TLD3a8qr7XBCtCN4Suzve1aWTcdn6U08t1nqb0CgjbwKEzNe-AsDVDOIFKCNvGmUrA2yAJruH_4X89ZNt_F2W833gubqEJ_fAz8RoT6k5Ca6UEY0EYa8PgldFAsDTBP8XB9eft6mYLLtS98sChDgewcjDWgzfwKq6UP4Z6IUxPcNd1d48_88Ga71J4gjvlXJCO4A64bkBp0YVGgj9KEJa7I9Rc3HrLhVz81BO6ILS6tuZgeQ_cHkIvtY8kgODODNGKuGTBXD5mAe5Ex_Vh7m3QtwR3tdIjOQFzE_fxYYi7gx-CXziYn8p8zl0_dw_a8xNhG6W97GDecyuOhG303eBPMcidCVY8ywEEGQV6oo9_2NYt5iWMn4OtCFu5B3ceXFul_ejg1-gxwfL5Jcvv98Z5K3lPMB-F11GUKM-vuEnwEz1duDxpG8kmr8gKiQJu1EHz7jeumy6Clhfb58duIYaoBh3_n4DwAlS0dVVmZd2kSGG_t9J5Y-Xe-gv1TtUEd6cy3-fpvFM6nOYHHc4Lgz9ayZuFMws6Mk7SFOmEL5uYYSWltAbLlZNvwBcROR-RU0ZpPUFOp8hZW2YV8Nq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