Currently, ASan inserts a call to __asan_handle_no_return before every
noreturn function call/invoke. This is unnecessary for calls to other
runtime funtions. This patch changes ASan to skip instrumentation for
functions calls marked with !nosanitize metadata.
Details
Details
- Reviewers
dcoughlin delcypher kcc eugenis cryptoad vsk morehouse - Commits
- rGf82d8924ef7f: [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`
rL352948: [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`
rC352948: [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
Comment Actions
Looks reasonable to me.
llvm/test/Instrumentation/AddressSanitizer/instrument-no-return.ll | ||
---|---|---|
3 ↗ | (On Diff #184410) | Could you make this more specific? E.g. 'noreturn calls that aren't inserted by sanitizers'. |
Comment Actions
Do we have a test that at most one __asan_handle_no_return call is inserted before a [[noreturn]] call?
Comment Actions
Improve comments.
Use CHECK-NEXT in test to ensure we insert exactly one handler call.