<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54599>54599</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Cryptic error "duplicate symbol: __foo.thunk.0 defined in <internal>"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld:MachO
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nico
</td>
</tr>
</table>
<pre>
1. Download https://drive.google.com/file/d/1C6gl6g6ovSTzfPVyEqgaFI4VM5ZaLz7Y/view?usp=sharing
2. `tar zxf repro_internal.tar.gz && cd repro`
3. ```
~/src/llvm-project/out/gn/bin/ld64.lld @response.txt
ld64.lld: error: duplicate symbol: __ZN15partition_alloc8internal12_GLOBAL__N_126FreelistCorruptionDetectedEm.thunk.0
>>> defined in <internal>
>>> defined in <internal>
ld64.lld: error: duplicate symbol: __ZN15partition_alloc8internal12_GLOBAL__N_126FreelistCorruptionDetectedEm.thunk.0
>>> defined in <internal>
>>> defined in <internal>
ld64.lld: error: duplicate symbol: __ZN15partition_alloc8internal12_GLOBAL__N_126FreelistCorruptionDetectedEm.thunk.0
>>> defined in <internal>
>>> defined in <internal>
```
The input is probably invalid in some way, but the error is very cryptic and not helpful.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVEuL3DAM_jXOxdQkziQzOeSwO49S2EehZaF7CU6sJG49dmo7szvz66tkdrosLYUeCw2KsKXvkyUhu7byWCaMbuyT0VZI2ocweJJeEb5DkU4dgHXWdhpYY_doapWGyYN_ss47nXe5PXz6fGo_Phy33zux-7B4uM0exc1p-QUxBwVPJN2NfiDpxvfCKdOReEPiK84oyeMgHD09t9TB4GylTABnhGZoZt2JEp6j0Eae_Yg_c9OZ-yKzheJHlls80bsGtdaH_TukfIUm4NaOk-4MqlpNWst8wbSWlCxiB36wxgMLz-FntAsAe0HBOeumhRwHrRoRgPrjvrZ6slXV412SDcIFFZQ1ldDaNqtLJQmv3t_cX1_dVNVdlfB85wC08mFtnRuHibCBgDmC3O5Z6Efzjb1WRNLtWaiEVhmQVBk0ri_BJ-dfY_9X-O9XOGHfzv9Zf-4BKcMYqPIUp78WtT6i5SC0moN5uwf6JI6Er2mNsICEuTMT4QDuSBt3xJIaKoykxgbagx7aUbNIlqks0kJE2CMN5foFd2YTzn_f19baS0v-UBTn0eh0-fbx6RQS65dnZ7rPv15r5f0IHhfZIiuKqC-bOEll2yZxvVoVvMmaHAqe5-m0iyFbRlrUoH1Jsms89Dwat6Lp73FHsk2kSh5zHqd8lRRZnKxYIeo2lst8IfMiqxcCnwvYC6XZlAmzrotcOSdVj51H5zQX_tUpvFedAZgPxPhiDL11pVGNjebkyznzH1vLvnM">