]> granicus.if.org Git - llvm/commit
[sancov] Don't instrument blocks with no insertion point
authorReid Kleckner <rnk@google.com>
Thu, 23 Mar 2017 23:30:41 +0000 (23:30 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 23 Mar 2017 23:30:41 +0000 (23:30 +0000)
commitbef4d671d90af517a6cda4b79afe9bb910265071
tree1c8f64d5224ee6c494f8861e55a4d7a780e060b6
parenta68ea0045a6cc10f9fcc315ed6cc0935d8862e9e
[sancov] Don't instrument blocks with no insertion point

This prevents crashes when attempting to instrument functions containing
C++ try.

Sanitizer coverage will still fail at runtime when an exception is
thrown through a sancov instrumented function, but that seems marginally
better than what we have now. The full solution is to color the blocks
in LLVM IR and only instrument blocks that have an unambiguous color,
using the appropriate token.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298662 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
test/Instrumentation/SanitizerCoverage/wineh.ll [new file with mode: 0644]