<div dir="ltr"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Time, David and </font><span style="font-size:14px">Nemanja, I add you as the reviewer for <a href="https://reviews.llvm.org/D42178">https://reviews.llvm.org/D42178</a> , feel free to comment on it.</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px">Alex, could you add </span><span style="font-size:14px">D42178 into your review corner? I hope someone who has more exception handling experience can review on it as well.</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px">Thanks.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-17 3:41 GMT+08:00 Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 16 January 2018 at 13:41, 陳韋任 <<a href="mailto:chenwj.cs97g@g2.nctu.edu.tw">chenwj.cs97g@g2.nctu.edu.tw</a>> wrote:<br>
> bar:<br>
><br>
>     .cfi_def_cfa_offset 16<br>
>     epilogue<br>
><br>
>     _Unwind_Resume<br>
><br>
><br>
><br>
> The lookup phase of exception handling is fine. However, something goes<br>
> wrong in cleanup phase. The reason is the unwinder evaluates CFI directives<br>
> until _Unwind_Resume, and `.cfi_def_cfa_offset 16` is the culprit. I think<br>
> this is what you were saying "have an epilogue in the middle of a function",<br>
> right?<br>
<br>
</span>I think so, though the assembly isn't really complete enough to tell.<br>
In this case if the .cfi_def_cfa_offset is describing the epilogue it<br>
would mean that all code in what you've labelled _Unwind_Resume<br>
(assuming that's actually a cleanup landing pad or something) will use<br>
the wrong SP to load the saved registers from. The unwinder will think<br>
it's executing directly after the epilogue since it's later on in the<br>
function.<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>