[PATCH] D147975: [StackProtector] don't check stack protector before calling nounwind functions
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 19:36:48 PDT 2023
efriedma added a comment.
> I think noreturn is a red-herring
noreturn without nounwind serves as a hint that the callee unconditionally throws an exception. (The only other alternatives are that the callee unconditionally calls abort(), or unconditionally spins in an infinite loop; such functions are relatively rare in most codebases.) But it's not really a strong heuristic; functions that are noreturn aren't guaranteed to throw, and functions that aren't noreturn frequently throw.
Longer-term, it might make sense to consider encoding information about the stack canary into DWARF data; if the unwinder can check the canary itself, that catches the relevant cases without a bunch of inline code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147975/new/
https://reviews.llvm.org/D147975
More information about the llvm-commits
mailing list