[PATCH] tsan: support C++ exceptions

Reid Kleckner rnk at google.com
Mon Jun 29 11:44:06 PDT 2015


On Mon, Jun 29, 2015 at 10:57 AM, Dmitry Vyukov <dvyukov at google.com> wrote:
>
> But it is possible that the next landingpad up the stack is within the
> same function. In such case I don't need to execute __tsan_func_exit.
> That's what I tried to show with the examples.


The 'resume' instruction always leaves the current function and unwinds the
stack. Intra-frame EH actions are handled by normal control flow, which is
what the icmp+br instructions are doing. This is pseudo-code for what the
landingpad is doing:

lpad:
  // EAX:EDX are live-in to the landingpad, think of it as the exceptional
return value
  (ehptr, ehselector) = (EAX, EDX);
  if (ehselector == kTypeIDInt) goto catch.int;
  if (ehselector == kTypeIDDouble) goto catch.double;
  resume;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150629/615b8f25/attachment.html>


More information about the llvm-commits mailing list