title: Suppress specific sanitizer check, but still fail program on all others
body: <p>I would like to suppress one error in a third-party library, but still have the program exit 1 on any other failed check. It seems to me that <code>-fno-sanitize-recover</code> will exit the program regardless of the <code>suppressions</code> file's contents. With <code>-fsanitize-recover</code> on the other hand, the specified error is correctly suppressed and the other one still printed, but the program exits normally, which I don't want.</p>
  <pre><code>$ cat main.cpp
  int main() {
    int k = 0x7fffffff;
    k++;      // signed-integer-overflow
    k &lt;&lt;= k;  // invalid-shift-exponent
    return 0;
  }
  
  $ clang++ -fsanitize=undefined -fno-sanitize-recover main.cpp -o main
  
  $ cat supp.txt
  signed-integer-overflow:main.cpp
  
  $ UBSAN_OPTIONS=report_error_type=1,suppressions=supp.txt ./main
  main.cpp:3:4: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
  SUMMARY: UndefinedBehaviorSanitizer: signed-integer-overflow main.cpp:3:4 in
  
  $ echo $?
  1
  
  $ clang++ -fsanitize=undefined -fsanitize-recover main.cpp -o main
  
  $ UBSAN_OPTIONS=report_error_type=1,suppressions=supp.txt ./main
  main.cpp:4:5: runtime error: shift exponent -2147483648 is negative
  SUMMARY: UndefinedBehaviorSanitizer: invalid-shift-exponent main.cpp:4:5 in
  
  $ echo $?
  0
  </code></pre>
  <p>How can I achieve the desired behavior? Are Ubsan suppressions and -fno-sanitize-recover really mutually exclusive?</p>