<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:dane@mapbox.com" title="Dane Springmeyer <dane@mapbox.com>"> <span class="fn">Dane Springmeyer</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Invalid code generation / optimization of C++ with -O3"
href="http://llvm.org/bugs/show_bug.cgi?id=19824">bug 19824</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Invalid code generation / optimization of C++ with -O3"
href="http://llvm.org/bugs/show_bug.cgi?id=19824#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Invalid code generation / optimization of C++ with -O3"
href="http://llvm.org/bugs/show_bug.cgi?id=19824">bug 19824</a>
from <span class="vcard"><a class="email" href="mailto:dane@mapbox.com" title="Dane Springmeyer <dane@mapbox.com>"> <span class="fn">Dane Springmeyer</span></a>
</span></b>
<pre>Good news. This turns out to be a bug in our usage of c++11 lambdas and is not
a problem in clang/llvm. We were passing references to objects into the lambdas
that were not designed to be copied or moved, which was perhaps creating
undefined behavior. Our guess is that its the -argpromotion optimization that
was triggering this problem - without it we were getting away with dodgy code.
Our fix was to do some deep refactoring in our code to not rely on lambdas in
the same way:
<a href="https://github.com/mapnik/mapnik/commit/a49e1d075e75ac5ddc6101e7d85c15c8688b5a32">https://github.com/mapnik/mapnik/commit/a49e1d075e75ac5ddc6101e7d85c15c8688b5a32</a>.
Sorry for the noise and thanks for helping discuss this issue until it became
clearer.</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>