[libcxx-commits] [PATCH] D90898: [libunwind] Unwind through aarch64/Linux sigreturn frame

Daniel Kiss via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 9 07:26:36 PST 2020


danielkiss added inline comments.


================
Comment at: libunwind/src/UnwindCursor.hpp:2016
+  // Look for instructions: mov x8, #0x8b; svc #0x0
+  if (_addressSpace.get32(pc) == 0xd2801168 &&
+      _addressSpace.get32(pc + 4) == 0xd4000001) {
----------------
compnerd wrote:
> It really would be amazing to have a link to the VDSO code here to make it easier to understand the check - I figured it was that this is the implementation, but had to chase through the files.
VDSO is an elf, so we could do something like this:

```
  void* handle = dlopen("linux-vdso.so.1", RTLD_LAZY);
  const pint_t ptr = (const pint_t)dlsym(handle, "__kernel_rt_sigreturn");
  if( pc == ptr ) ... 

```
This could help with the XOM issue too. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90898



More information about the libcxx-commits mailing list