[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
Thu Jun 17 14:42:57 PDT 2021


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

I believe that Android used to use these older versions of libgcc, however Android has now moved to libunwind on aarch64 and although old libgcc versions may still be linked into applications, I do not believe that Android platform code compiled with SCS will run on the same thread as application code, so the old libgcc versions should not be exposed to this unwind info.

So the semantics of thread cancellation on glibc are that C++ destructors are called during cancellation? That's not required as far as I can tell, but I suppose that if someone adds SCS support to glibc and builds it with -ffixed-x18 then it should be possible for the destructors to run during cancellation.

So let's go with this I suppose and if it turns out that someone is using an incompatible unwinder then they can add an opt out for their platform.


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