[libcxx-commits] [PATCH] D126343: [libunwind] Use process_vm_readv to avoid potential segfaults
Matt Denton via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 26 16:12:44 PDT 2023
mpdenton added a comment.
The Chrome sandbox disallows process_vm_readv() (I think most seccomp sandboxes would) so this causes crashes when trying to collect backtraces at runtime.
What would happen if I caused process_vm_read() to return EPERM here? Would the unwinder still be able to unwind past the sigreturn trampoline with heuristics?
If not, is it possible to introduce a fallback that reads from the address directly, or possibly uses mincore() to check if the address is valid (a small race is possible)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126343/new/
https://reviews.llvm.org/D126343
More information about the libcxx-commits
mailing list