<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - fatal error: error in backend: SmallVector unable to grow. Requested capacity (4294967296) is larger than maximum value for size type (4294967295)"
href="https://bugs.llvm.org/show_bug.cgi?id=51656">51656</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fatal error: error in backend: SmallVector unable to grow. Requested capacity (4294967296) is larger than maximum value for size type (4294967295)
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>haoxintu@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hi all.
The following program can not be compiled in trunk clang and it eats all my
machine's memory (~300G) then crashes.
$cat small.c
#include <stdint.h>
i_0 = 0x8ECD075E;
ui_3 = 0x08977994;
uc_4 = 0x2D;
uli_5 = 0x4411BDCE4F3D969E;
li_7 = 0x0;
li_10 = 0x095C7ABB74102A98;
uli_12 = 0x26B2F0F7AA21F311;
uli_15 = 0x0;
func_1(uint32_t ui_17) {
uint16_t us_19 = 0xFC96;
uint64_t ptr_20 = uli_12;
uint32_t ui_21 = 0x54C1FC46;
for (us_19 = 18; us_19 <= 68; us_19 += 1) {
uint64_t **ptr_29 = ptr_20;
int64_t li_30 = 0xCC26ECA322A5E1C7;
int16_t s_33 = 0xB176;
if ((0 >= 0)) {
uint64_t ptr_35 = uli_12;
if (0) {
uint64_t ptr_41 = ptr_35;
uint32_t ui_43 = 0x706BAD24;
if (0)
if (0) {
for (ptr_29 = 13; **ptr_29 <= 88; **ptr_29 += 1)
if (0)
;
for (uc_4 = 26; uc_4 <= 81; uc_4 += 1) {
if (0)
for (i_0 = 16; ui_17 <= 63; ui_17 += 1)
lbl237BFDEF:
for (ui_43 = 16; ui_43 <= 59; ui_43 += 1)
;
}
}
} else {
for (li_10 = 11; li_10 <= 34; li_10 += 1) {
int16_t s_51 = 0x0;
if (((ui_17 = (s_51 ^= (ui_3 %= ui_17))) && 0))
;
}
for (ui_21 = 19; ui_21 <= 45; ui_21 += 1) {
if (0)
;
else
for (li_7 = 17; uli_15 <= 54; uli_15 += 1)
goto lbl237BFDEF;
for (ui_17 = 5; ui_17 <= 49; ui_17 += 1)
;
}
}
}
for (uli_5 = 10; uli_5 <= 60; s_33 += 1)
;
}
}
$time clang -c -w -O3 -g small.c
fatal error: error in backend: SmallVector unable to grow. Requested capacity
(4294967296) is larger than maximum value for size type (4294967295)
clang-14: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 14.0.0 (<a href="https://github.com/llvm/llvm-project">https://github.com/llvm/llvm-project</a>
a45d72e0247d080eb9437736bb6cadfc27e4c065)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/haoxin/haoxin-data/compilers/llvm-project/build/bin
clang-14: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /tmp/small-b8b355.c
clang-14: note: diagnostic msg: /tmp/small-b8b355.sh
clang-14: note: diagnostic msg:
********************
real 1m25.484s
user 1m4.453s
sys 0m21.027s
$time clang -c -w -O2 -g small.c
real 0m0.092s
user 0m0.035s
sys 0m0.032s
$clang -v
clang version 14.0.0 (<a href="https://github.com/llvm/llvm-project">https://github.com/llvm/llvm-project</a>
a45d72e0247d080eb9437736bb6cadfc27e4c065)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/haoxin/haoxin-data/compilers/llvm-project/build/bin
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/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
Thanks,
Haoxin</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>