[libcxx-commits] [PATCH] D105968: [libunwind][CET] Support exception handling stack unwind in CET environment
xiongji90 via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 14 07:14:21 PDT 2021
xiongji90 added inline comments.
================
Comment at: libunwind/src/UnwindRegistersRestore.S:51
+ add $4, %esp
+ jmp *-4(%esp) # use indirect jump instead of 'ret' to avoid pushing shadow stack
# skip cs
----------------
hjl.tools wrote:
> I don't think it is safe to access memory below stack pointer in 32-bit mode since there is no red zone. Please check what
> the GCC unwinder does.
Hi, @hjl.tools
Before jumping to -4(%esp), we have added 4 to %esp value, so we should access a valid stack frame here.
Before adding 4 to esp, it should point to memory location where jump target address resides.
Thanks very much.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105968/new/
https://reviews.llvm.org/D105968
More information about the libcxx-commits
mailing list