[PATCH] D56624: [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls
Evgenii Stepanov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 24 14:31:30 PST 2019
eugenis added a comment.
> Because "expect_noreturn" calls are allowed to return, the compiler must behave as they could. In particular, this means that unpoisoning the stack before expect_noreturn calls (given the current semantics) is premature.
I don't think that's true. A hypothetical function
maybe_longjmp(jmp_buf env)
that checks an opaque condition needs stack unpoisoning before the call, in the absense of a better solution.
One possible optimization that I can think of is splitting code after the call into a separate basic block and marking it as cold.
Admittedly, that's unlikely to have big impact in practice. I'd guess that [[expect_noreturn]] calls are typically not very hot in the first place.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56624/new/
https://reviews.llvm.org/D56624
More information about the cfe-commits
mailing list