<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 - clang-4.0.1 introduces randomness into binaries"
href="https://bugs.llvm.org/show_bug.cgi?id=35277">35277</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-4.0.1 introduces randomness into binaries
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</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>enhancement
</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>llvmbmw@lsmod.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Originally filed at
<a href="https://bugzilla.opensuse.org/show_bug.cgi?id=1067478">https://bugzilla.opensuse.org/show_bug.cgi?id=1067478</a>
When working on making openSUSE Linux package builds reproducible,
I found that our gnustep-libobjc2 differed across builds because
libobjc2-1.8.1 contains an arc.m that produces 8 different .o files when
compiled with clang-4.0.1, unless ASLR is disabled.
>From that I condensed this standalone minimal reproducer:
cat > test.m <<EOF
typedef id (*IMP)(id, ...);
static Class c1;
void f1(void)
{
@selector(f2);
IMP v1 = @selector(f3);
}
EOF
for i in $(seq 15) ; do
clang -c test.m -o /dev/stdout 2>/dev/null | md5sum ; done |
sort | uniq -c | wc -l
Actual Result: 2
Expected Result: 1
Same result with clang-5.0.0</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>