<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - StackProtector pass crashes when module compiled twice"
href="https://llvm.org/bugs/show_bug.cgi?id=31003">31003</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>StackProtector pass crashes when module compiled twice
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>1101.debian@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>StackProtector::InsertStackProtectors has the following code (simplified):
AllocaInstr *AI = nullptr;
if (HasPrologue == false) {
CreatePrologue(AI);
}
AI->FooBar()
However, when the prologue already exists, then AI is not initialized, which
lead to a crash.
So far I managed to reproduce it only by compiling a module twice using ORC's
compiler with optimizations disabled.
But it should be clear that code has problem.
Problematic code was introduced with this commit:
<a href="https://github.com/llvm-mirror/llvm/commit/1a7750eecd21d052a69faa43cadefe3215d4f920">https://github.com/llvm-mirror/llvm/commit/1a7750eecd21d052a69faa43cadefe3215d4f920</a></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>