<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 - ld64.lld.darwinnew unwind info is incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=48389">48389</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ld64.lld.darwinnew unwind info is incorrect
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>MachO
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>…or at least subtly different from ld64.
Repro:
1. Download
<a href="https://drive.google.com/file/d/1Gjrg4bQCv3uD9Ucqt4ZtroHrz5v0iCJX/view?resourcekey=0-f53UMW57gtrPlSis2sTjKg">https://drive.google.com/file/d/1Gjrg4bQCv3uD9Ucqt4ZtroHrz5v0iCJX/view?resourcekey=0-f53UMW57gtrPlSis2sTjKg</a>
and unzip it
2. ~/src/llvm-project/out/gn/bin/ld64.lld.darwinnew @response.txt
3. ./base_unittests --gtest_filter='*Exception*'
Expected: All 3 tests pass
Actual: CallWithEHFrameTest.CatchExceptionHigher crashes.
If you remove --color-diagnostics from response.txt and link with regular `ld`,
it passes.
The source of the test is here:
<a href="https://source.chromium.org/chromium/chromium/src/+/master:base/mac/call_with_eh_frame_unittest.mm;l=25?q=CatchExceptionHigher&ss=chromium">https://source.chromium.org/chromium/chromium/src/+/master:base/mac/call_with_eh_frame_unittest.mm;l=25?q=CatchExceptionHigher&ss=chromium</a>
The implementation of CallWithEHFrame is here:
<a href="https://source.chromium.org/chromium/chromium/src/+/master:base/mac/call_with_eh_frame_asm.S;bpv=1;bpt=0">https://source.chromium.org/chromium/chromium/src/+/master:base/mac/call_with_eh_frame_asm.S;bpv=1;bpt=0</a>
It's assembly with a custom personality routine, so it's possible things are
wrong in the code -- but it's been working for 5 years and it works with ld64.
<a href="https://codereview.chromium.org/1212093002">https://codereview.chromium.org/1212093002</a> has the motivation for that code.</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>