<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 - Machine outliner runs out of stack space analyzing large sequences"
href="https://bugs.llvm.org/show_bug.cgi?id=44344">44344</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Machine outliner runs out of stack space analyzing large sequences
</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>lewis.revill@embecosm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Discussed in <a href="https://reviews.llvm.org/D66210">https://reviews.llvm.org/D66210</a>, this bug occurs when running the
following testcase with machine outlining enabled for RISC-V (command used to
run: 'riscv32-unknown-elf-clang -O -c -mllvm -enable-machine-outliner'):
/* PR rtl-optimization/48141 */
/* { dg-do compile } */
/* { dg-options "-O" } */
#define A i = 0;
#define B A A A A A A A A A A
#define C B B B B B B B B B B
#define D C C C C C C C C C C
#define E D D D D D D D D D D
int
foo (void)
{
volatile int i = 0;
E E E E E E E E E E E
return 0;
}
This fails with a segmentation fault from within the function
'setSuffixIndices'. Valgrind reports that after a large amount of recursive
calls of this function the program runs out of stack memory.
I have attempted to reproduce this bug for X86 or AArch64 but due to some of
the target-specific restrictions on what instructions can be outlined I found
it intractable to create a simple testcase. However by temporarily modifying
those restrictions within the compiler I can indeed reproduce this segmentation
fault.</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>