[compiler-rt] r312860 - [ubsan] Enable UBsan in sanitizer_common tests
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 23:10:58 PDT 2017
Author: vitalybuka
Date: Fri Sep 8 23:10:58 2017
New Revision: 312860
URL: http://llvm.org/viewvc/llvm-project?rev=312860&view=rev
Log:
[ubsan] Enable UBsan in sanitizer_common tests
Summary:
Failing tests just marked as UNSUPPORTED or XFAIL.
Some of them can be easily supported, but I'll do this in separate patches.
Reviewers: eugenis, alekseyshl
Subscribers: srhines, kubamracek, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D37630
Modified:
compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc
compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
Modified: compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt Fri Sep 8 23:10:58 2017
@@ -11,6 +11,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND
list(APPEND SUPPORTED_TOOLS tsan)
list(APPEND SUPPORTED_TOOLS msan)
list(APPEND SUPPORTED_TOOLS lsan)
+ list(APPEND SUPPORTED_TOOLS ubsan)
endif()
# Create a separate config for each tool we support.
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/allow_user_segv.cc Fri Sep 8 23:10:58 2017
@@ -21,6 +21,7 @@
// UNSUPPORTED: lsan
// UNSUPPORTED: msan
// UNSUPPORTED: tsan
+// UNSUPPORTED: ubsan
#include <signal.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/assert.cc Fri Sep 8 23:10:58 2017
@@ -7,6 +7,7 @@
// XFAIL: msan
// XFAIL: lsan
// XFAIL: tsan
+// XFAIL: ubsan
#include <assert.h>
#include <stdio.h>
#include <sanitizer/asan_interface.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cc Fri Sep 8 23:10:58 2017
@@ -57,5 +57,6 @@ int main(void) {
// CHECK-tsan: rw-p {{.*}} [trace 1]
// CHECK-tsan: rw-p {{.*}} [trace header 1]
-// Nothing interesting with standalone LSan.
+// Nothing interesting with standalone LSan and UBSan.
// CHECK-lsan: decorate_proc_maps
+// CHECK-ubsan: decorate_proc_maps
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/deepbind.cc Fri Sep 8 23:10:58 2017
@@ -1,5 +1,5 @@
// RUN: %clangxx %s -o %t && %run not %t 1 2>&1 | FileCheck %s
-// UNSUPPORTED: lsan, android
+// UNSUPPORTED: lsan,ubsan,android
#include <dlfcn.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc Fri Sep 8 23:10:58 2017
@@ -14,6 +14,7 @@
// XFAIL: lsan
// XFAIL: tsan
// XFAIL: msan
+// XFAIL: ubsan
#include <string.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc Fri Sep 8 23:10:58 2017
@@ -7,6 +7,7 @@
// XFAIL: msan
// XFAIL: lsan
// XFAIL: tsan
+// XFAIL: ubsan
//
// FIXME: seems to fail on ARM
// REQUIRES: x86_64-target-arch
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mlock_test.cc Fri Sep 8 23:10:58 2017
@@ -1,5 +1,5 @@
// RUN: %clang %s -o %t && %run %t
-// XFAIL: lsan
+// XFAIL: ubsan,lsan
#include <assert.h>
#include <sys/mman.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/mprobe.cc Fri Sep 8 23:10:58 2017
@@ -1,5 +1,5 @@
// RUN: %clangxx %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: android
+// UNSUPPORTED: android, ubsan
#include <stdio.h>
#include <stdlib.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc Fri Sep 8 23:10:58 2017
@@ -1,7 +1,7 @@
// RUN: %clangxx -O0 -g %s -lutil -o %t && %run %t
// This test depends on the glibc layout of struct sem_t and checks that we
// don't leave sem_t::private uninitialized.
-// UNSUPPORTED: android, lsan-x86
+// UNSUPPORTED: android, lsan-x86, ubsan
#include <features.h>
#include <assert.h>
#include <semaphore.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cc Fri Sep 8 23:10:58 2017
@@ -14,6 +14,7 @@
// XFAIL: lsan
// XFAIL: tsan
// XFAIL: msan
+// XFAIL: ubsan
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/unexpected_format_specifier_test.cc Fri Sep 8 23:10:58 2017
@@ -1,6 +1,7 @@
// RUN: %clang -w -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: lsan
// UNSUPPORTED: msan
+// UNSUPPORTED: ubsan
#include <stdio.h>
int main() {
int a;
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc Fri Sep 8 23:10:58 2017
@@ -11,6 +11,7 @@
// XFAIL: msan
// XFAIL: lsan
// XFAIL: tsan
+// XFAIL: ubsan
volatile int *null = 0;
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/fpe.cc Fri Sep 8 23:10:58 2017
@@ -7,6 +7,7 @@
// XFAIL: msan
// XFAIL: lsan
// XFAIL: tsan
+// XFAIL: ubsan
//
// FIXME: seems to fail on ARM
// REQUIRES: x86_64-target-arch
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc Fri Sep 8 23:10:58 2017
@@ -8,6 +8,7 @@
// the last line of main function. The problem doesn't reproduce with ASan because
// quarantine prohibits memory block reuse for different allocations.
// XFAIL: lsan-x86
+// XFAIL: ubsan
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cc Fri Sep 8 23:10:58 2017
@@ -9,6 +9,7 @@
// XFAIL: msan
// XFAIL: lsan
// XFAIL: tsan
+// XFAIL: ubsan
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/weak_hook_test.cc Fri Sep 8 23:10:58 2017
@@ -4,6 +4,7 @@
// Hooks are not implemented for lsan.
// XFAIL: lsan
+// XFAIL: ubsan
#include <string.h>
#include <assert.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/corelimit.cc Fri Sep 8 23:10:58 2017
@@ -1,5 +1,5 @@
// RUN: %clangxx -O0 %s -o %t && %run %t
-// UNSUPPORTED: lsan
+// UNSUPPORTED: lsan,ubsan
#include <assert.h>
#include <sys/time.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/malloc_hook.cc Fri Sep 8 23:10:58 2017
@@ -2,6 +2,7 @@
// Malloc/free hooks are not supported on Windows.
// XFAIL: win32
+// XFAIL: ubsan
#include <stdlib.h>
#include <unistd.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/options-include.cc Fri Sep 8 23:10:58 2017
@@ -1,4 +1,5 @@
// RUN: %clangxx -O0 %s -o %t
+// UNSUPPORTED: ubsan
// Recursive include: options1 includes options2
// RUN: echo "symbolize=1" > %t.options1.txt
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc Fri Sep 8 23:10:58 2017
@@ -4,6 +4,7 @@
// RUN: %env_tool_opts=symbolize_inline_frames=false:stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s --check-prefix=NOINLINE
// UNSUPPORTED: darwin
+// XFAIL: ubsan
#include <sanitizer/common_interface_defs.h>
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc Fri Sep 8 23:10:58 2017
@@ -2,7 +2,7 @@
//
// REQUIRES: has_sancovcc,stable-runtime
// UNSUPPORTED: i386-darwin
-// XFAIL: tsan
+// XFAIL: ubsan,tsan
//
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb,no-prune 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 3
// RUN: %clangxx -O0 %s -S -o - -emit-llvm -fsanitize-coverage=trace-pc,bb 2>&1 | grep "call void @__sanitizer_cov_trace_pc" | count 2
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cc Fri Sep 8 23:10:58 2017
@@ -1,6 +1,7 @@
// Tests trace pc guard coverage collection.
//
// REQUIRES: has_sancovcc,stable-runtime
+// UNSUPPORTED: ubsan
// XFAIL: tsan,darwin,powerpc64,s390x,mips
//
// RUN: DIR=%t_workdir
@@ -68,5 +69,5 @@ int baz() {
//
// CHECK-SANCOV: Ignoring {{.*}}_1.so and its coverage because __sanitizer_cov* functions were not found.
// CHECK-SANCOV: Ignoring {{.*}}_2.so and its coverage because __sanitizer_cov* functions were not found.
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:29 foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:34 main
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-42]] foo
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard-dso.cc:[[@LINE-38]] main
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cc Fri Sep 8 23:10:58 2017
@@ -1,7 +1,7 @@
// Tests trace pc guard coverage collection.
//
// REQUIRES: has_sancovcc,stable-runtime
-// UNSUPPORTED: i386-darwin
+// UNSUPPORTED: ubsan,i386-darwin
// XFAIL: tsan,powerpc64,s390x,mips
//
// RUN: DIR=%t_workdir
@@ -36,7 +36,7 @@ int main() {
// CHECK-NEXT: foo
// CHECK-NEXT: SanitizerCoverage: ./sanitizer_coverage_trace_pc_guard.{{.*}}.sancov: 2 PCs written
//
-// CHECK-SANCOV: sanitizer_coverage_trace_pc_guard.cc:23 foo
-// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard.cc:28 main
+// CHECK-SANCOV: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-16]] foo
+// CHECK-SANCOV-NEXT: sanitizer_coverage_trace_pc_guard.cc:[[@LINE-12]] main
//
// CHECK-NOCOV-NOT: SanitizerCoverage
Modified: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg?rev=312860&r1=312859&r2=312860&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg (original)
+++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg Fri Sep 8 23:10:58 2017
@@ -18,6 +18,9 @@ elif config.tool_name == "msan":
elif config.tool_name == "lsan":
tool_cflags = ["-fsanitize=leak"]
tool_options = "LSAN_OPTIONS"
+elif config.tool_name == "ubsan":
+ tool_cflags = ["-fsanitize=undefined"]
+ tool_options = "UBSAN_OPTIONS"
else:
lit_config.fatal("Unknown tool for sanitizer_common tests: %r" % config.tool_name)
More information about the llvm-commits
mailing list