[PATCH] D136667: Check return address stored in normal stack and CET shadow stack in unwind process phase2

xiongji90 via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 22:35:54 PDT 2022


xiongji90 added a comment.

In D136667#3897494 <https://reviews.llvm.org/D136667#3897494>, @MaskRay wrote:

> Is this check a libgcc behavior? Is it intended for just C++ exceptions (regular phase2) or also for `_Unwind_ForcedUnwind`?
>
> Can you craft an example to demonstrate a failure caught by the new check? It is going to be brittle so I can understand that a test is likely inappropriate.
>
> For C++ exceptions `exception_object->exception_class != 0` is always true while for `_Unwind_ForcedUnwind` `exception_class` is typically zero, so I am not sure having the code in `unwind_phase2_forced` is useful...

Hi, @MaskRay 
If so, I will remove unnecessary check in unwind_phase2_forced and where can I find any document or description about
"For C++ exceptions `exception_object->exception_class != 0` is always true while for `_Unwind_ForcedUnwind` `exception_class` is typically zero"?
Thanks very much.

Thanks very much.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136667



More information about the llvm-commits mailing list