<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82261>82261</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Mach-O check for improperly nested .cfi_* regions doesn't take .alt_entry into account
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Amanieu
</td>
</tr>
</table>
<pre>
This issue was hit in https://github.com/Amanieu/corosensei/issues/23 where we have code that looks like this:
```asm
.globl _stack_init_trampoline
.private_extern _stack_init_trampoline
_stack_init_trampoline:
.cfi_startproc
[...]
.alt_entry _stack_init_trampoline_return
.globl _stack_init_trampoline_return
.private_extern _stack_init_trampoline_return
_stack_init_trampoline_return:
[...]
.cfi_endproc
```
This currently produces the following error due to https://reviews.llvm.org/D155245:
```
error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
```
However I think (I am not an expert in Mach-O) that this should be valid since the inner label is properly marked with `.alt_entry`.
cc @jroelofs
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVMGOozgQ_RpzKTUCAwkcOGQUoZ3Dai97j4ypBE-MjcpFmPz9Csh0p0c7UUtRkOHZ9d6r51IhmItDrEXxTRTHSE3ce6oPg3IGp6j13b3-tzcBTAgTwqwC9IbBOOiZxyCyg5CNkM3FcD-1sfaDkM1jt5CN9uQDuoBGyGY9IgjZyAzmHglhRujVDUH7DoF7xWC9vwaw5rqszXp-chTJQeyS7afCsL2JL9a3Fk6Blb6ejDN8YlLD6K1x-ICMZG6K8YQ_Gcm9xP7h26_6sT6bBUI8ktcPTsW3OI5FcXxAlOUTOqb7HwqdCHki9wX6n5FfUvFpy2vIu6e_8V8kouueBP4y_bFc_9c06IkIHds7jOS7SWMA7hHO3lo_G3cBJPIE3YTA_reoEN4MziG29jbEni5CNse0KGRefDD7v_LrkSI7gPPu7eEJWNWiDaCVc55BjSMqghZ5RnTwuWkgZAPPImFUhsILqX_5GW9I8H3JoruCkOV3UAOspRzgzxFpvQt_K92__SNktYV4SS6E3k-2gxbhpqzpIBincXXJOIe0MQcTFgdHJHuHQdEVO5gN9yB2yUeelsUzL61B5MkP8mj9OURdnXVVVqkI63SflFlR5XkW9XV2LtMC8zJpM5l1SZFUZSuTdteWbdFimUamlonME5lW6S7dyyxGpVRZ5UWlztW-KHciT3BQxr73KlrvcF1KuUujzft1ckjpcN5mhJByGSRUL3ve2ukSRJ5YE_ij4xEbtlhvroHuUV_h7AnM8O6Fw8DYbe0S8gCEF-NdgM5jcELuGVhdEZ7unHHsQWntJ8fRRLZ-MaAWIo_H20j-B2p-nk-rvP8CAAD__y2Fr0E">