Unpoison stack before resume instruction
authorVitaly Buka <vitalybuka@google.com>
Fri, 22 Jul 2016 22:04:38 +0000 (22:04 +0000)
committerVitaly Buka <vitalybuka@google.com>
Fri, 22 Jul 2016 22:04:38 +0000 (22:04 +0000)
commite3a032a7408ccff451cb5c081511797e05dca162
tree4dfdb955c8e60c185b06f53d1bba4dc3ae409d56
parentba21ffebff540841da6c8847fcecd82ae734038d
Unpoison stack before resume instruction

Summary:
Clang inserts cleanup code before resume similar way as before return instruction.
This makes asan poison local variables causing false use-after-scope reports.

__asan_handle_no_return does not help here as it was executed before
llvm.lifetime.end inserted into resume block.

To avoid false report we need to unpoison stack for resume same way as for return.

PR27453

Reviewers: kcc, eugenis

Differential Revision: https://reviews.llvm.org/D22661

llvm-svn: 276480
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll [new file with mode: 0644]
llvm/test/Instrumentation/AddressSanitizer/lifetime.ll