[PATCH] D79822: [AArch64] Emit CFI instruction for updating x18 when using ShadowCallStack with exception unwinding
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 17:15:36 PDT 2020
pcc added a comment.
It is unclear to me whether removing the `nounwind` condition is necessary. The wording in the langref talks about "asynchronous exceptions" but only provides semantics for "exception handling schemes that are recognized by LLVM to handle asynchronous exceptions, such as SEH". Since we don't support anything like that on non-Windows. I don't believe that we need to support throwing exceptions past such functions on DWARF platforms, and the unwind info can only be used for the purpose of creating a stack trace.
Furthermore, I believe that certain versions of libgcc will crash if they see this unwind info, so we can't emit it unconditionally.
When I wrote the commit message, the "currently required" referred to a hypothetical implementation of SCS that does not store return addresses on the regular stack but rather just the shadow stack. In that case, unwinding for stack traces would need to see this unwind info.
`_Unwind_RaiseException` should not have the nounwind attribute, since it can clearly be unwound past using synchronous exceptions. So maybe that should be fixed instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79822/new/
https://reviews.llvm.org/D79822
More information about the llvm-commits
mailing list