[PATCH] D57982: [SanitizierCoverage] Avoid splitting critical edges when destination is a basic block containing unreachable

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 11:12:42 PST 2019


rnk added a comment.

In D57982#1412373 <https://reviews.llvm.org/D57982#1412373>, @vitalybuka wrote:

> In D57982#1412322 <https://reviews.llvm.org/D57982#1412322>, @morehouse wrote:
>
> > Sure, but that block is generally still not useful to instrument (for fuzzing).  When fuzzing, we save all inputs that either (1) increase coverage as measured by SanitizerCoverage, or (2) crash.  So if case 2 happens every time we touch a block that ends in unreachable, there's no point in instrumenting it so that case 1 happens too.
>
>
> This explanation looks reasonable to me.


A block ending in unreachable does not necessarily crash, there are two very interesting cases where it doesn't:

1. C++ throw
2. longjmp

Maybe longjmp doesn't matter because you will get new coverage after returning to setjmp, but you don't have coverage for the many different ways of jumping to the same setjmp block.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57982/new/

https://reviews.llvm.org/D57982





More information about the llvm-commits mailing list