<html>
<head>
<base href="http://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 --- - initialize a large static array = clang oom?"
href="http://llvm.org/bugs/show_bug.cgi?id=18978">18978</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>initialize a large static array = clang oom?
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sunyucong@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12154" name="attach_12154" title="code+sh">attachment 12154</a> <a href="attachment.cgi?id=12154&action=edit" title="code+sh">[details]</a></span>
code+sh
clang 3.3 is fine (although slow)
clang 3.4 will oom
[2632819.135797] Out of memory: Kill process 11919 (clang) score 848
or sacrifice child
[2632819.136017] Killed process 11919 (clang) total-vm:7024768kB,
anon-rss:6925660kB, file-rss:64kB
it boils down to a single line change:
static cache_entry_t cache[APPLY_CACHE_SIZE] = {{ 0 }};
will cause the oom (in 3.3 it will produce a pretty big object file, like 128M)
static cache_entry_t cache[APPLY_CACHE_SIZE];
will fix the oom, the end effect is same, since static variables are
initialized to 0 anyway.</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>