[compiler-rt] r304632 - [sanitizer-coverage] test for -fsanitize-coverage=inline-8bit-counters

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 18:58:16 PDT 2017


Hi Kostya,

I needed to mark this test as unsupported on 64-bit Darwin to unblock our bots (see: r304673). Just a heads-up.

best,
vedant

> On Jun 2, 2017, at 6:36 PM, Kostya Serebryany via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: kcc
> Date: Fri Jun  2 20:36:53 2017
> New Revision: 304632
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=304632&view=rev
> Log:
> [sanitizer-coverage] test for -fsanitize-coverage=inline-8bit-counters
> 
> Added:
>    compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
> 
> Added: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc?rev=304632&view=auto
> ==============================================================================
> --- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc (added)
> +++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc Fri Jun  2 20:36:53 2017
> @@ -0,0 +1,23 @@
> +// Tests -fsanitize-coverage=inline-8bit-counters
> +//
> +// REQUIRES: has_sancovcc,stable-runtime
> +// UNSUPPORTED: i386-darwin
> +//
> +// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
> +
> +#include <stdio.h>
> +#include <assert.h>
> +
> +const char *first_counter;
> +
> +extern "C"
> +void __sanitizer_cov_8bit_counters_init(const char *start, const char *end) {
> +  printf("INIT: %p %p\n", start, end);
> +  assert(end - start > 1);
> +  first_counter = start;
> +}
> +
> +int main() {
> +  assert(first_counter);
> +  assert(*first_counter == 1);
> +}
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list