[PATCH] D77920: [Windows EH] Fix the order of Nested try-catches in $tryMap$ table

Ten Tzen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 16:34:11 PDT 2020


tentzen added a comment.

In D77920#1984956 <https://reviews.llvm.org/D77920#1984956>, @rnk wrote:

> Sounds good, and the fix looks simple, but please add a test.
>
> I'm surprised this change doesn't break an existing test, I'd expect us to have a test for the LSDA of a try-in-catch:
>
>   try { }
>   catch () {
>     try { }
>     catch () { }
>   }
>
>
> As I understand it, the outer TBME must appear before the inner one, and the current behavior puts them in the other way around, innermost first.


Are  you questioning the throw in outer _try or inner _try?  Windows runtime expects outer-first and inner-next ordering.  It searches TBME table in REVERSED ordering.  So for throw in inner _try, the inner catch is located.  For the throw in outer _try, the State of it is lower then inner one. So the inner catch will be skipped and outer catch will be located.  Hope this answer your question.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77920/new/

https://reviews.llvm.org/D77920





More information about the llvm-commits mailing list