[PATCH] D98906: [X86] Improve lowering of the unrolled inline-asm probing

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 06:19:18 PDT 2021


serge-sans-paille added a comment.

> Besides the accurate uwtables, there's another conflicting use-case here – signal handlers. If we `sub` and then probe, we may receive a signal (and allocate a stack slot for it) in a potentially invalid stack area. Whereas if we probe and then sub, any signal handlers that occur during probing would still execute on what is significantly more likely to be a valid stack.

If my understanding is correct, (and in the case where an alternate stack is not used) the signal handler begins with a ``push   rbp`` so it should touch the stack and triggers the PAGE_GUARD... mmmh unless we're right at the end of the page guard after the sub, so maybe we should `subq $4095` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98906



More information about the llvm-commits mailing list