diff options
7 files changed, 7 insertions, 11 deletions
diff --git a/compiler-rt/lib/asan/scripts/asan_symbolize.py b/compiler-rt/lib/asan/scripts/asan_symbolize.py index d53ec3571c1..cd5d89ba221 100755 --- a/compiler-rt/lib/asan/scripts/asan_symbolize.py +++ b/compiler-rt/lib/asan/scripts/asan_symbolize.py @@ -280,7 +280,7 @@ def BreakpadSymbolizerFactory(binary): def SystemSymbolizerFactory(system, addr, binary, arch): if system == 'Darwin': return DarwinSymbolizer(addr, binary, arch) - elif system == 'Linux' or system == 'FreeBSD' or system == 'NetBSD': + elif system in ['Linux', 'FreeBSD', 'NetBSD']: return Addr2LineSymbolizer(binary) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index e7230e43be2..601f230ed15 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -137,10 +137,6 @@ typedef int error_t; #endif typedef int pid_t; -// WARNING: OFF_T may be different from OS type off_t, depending on the value of -// _FILE_OFFSET_BITS. This definition of OFF_T matches the ABI of system calls -// like pread and mmap, as opposed to pread64 and mmap64. -// FreeBSD, NetBSD, Mac and Linux/x86-64 are special. #if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_MAC || \ (SANITIZER_LINUX && defined(__x86_64__)) typedef u64 OFF_T; diff --git a/compiler-rt/test/asan/TestCases/alloca_constant_size.cc b/compiler-rt/test/asan/TestCases/alloca_constant_size.cc index a766ae75be0..57aa315705f 100644 --- a/compiler-rt/test/asan/TestCases/alloca_constant_size.cc +++ b/compiler-rt/test/asan/TestCases/alloca_constant_size.cc @@ -10,7 +10,7 @@ // MSVC provides _alloca instead of alloca. #if defined(_MSC_VER) && !defined(alloca) # define alloca _alloca -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) #include <stdlib.h> #else #include <alloca.h> diff --git a/compiler-rt/test/asan/TestCases/atexit_stats.cc b/compiler-rt/test/asan/TestCases/atexit_stats.cc index f0b5830b405..c8d97da5292 100644 --- a/compiler-rt/test/asan/TestCases/atexit_stats.cc +++ b/compiler-rt/test/asan/TestCases/atexit_stats.cc @@ -7,7 +7,7 @@ // UNSUPPORTED: android #include <stdlib.h> -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) #include <malloc.h> #endif int *p1 = (int*)malloc(900); diff --git a/compiler-rt/test/asan/TestCases/non-executable-pc.cpp b/compiler-rt/test/asan/TestCases/non-executable-pc.cpp index f8adee613b0..6ef40540b0a 100644 --- a/compiler-rt/test/asan/TestCases/non-executable-pc.cpp +++ b/compiler-rt/test/asan/TestCases/non-executable-pc.cpp @@ -2,8 +2,8 @@ // RUN: not %run %t 0 2>&1 | FileCheck %s // RUN: not %run %t n 2>&1 | FileCheck %s -check-prefix=CHECK -check-prefix=NON_EXEC -// Only Linux and FreeBSD list every memory region in MemoryMappingLayout, for now. -// REQUIRES: linux || freebsd +// Not every OS lists every memory region in MemoryMappingLayout. +// REQUIRES: linux || freebsd || netbsd #include <assert.h> diff --git a/compiler-rt/test/asan/TestCases/verbose-log-path_test.cc b/compiler-rt/test/asan/TestCases/verbose-log-path_test.cc index a63c5847524..3c3db0883f6 100644 --- a/compiler-rt/test/asan/TestCases/verbose-log-path_test.cc +++ b/compiler-rt/test/asan/TestCases/verbose-log-path_test.cc @@ -8,7 +8,7 @@ // RUN: %env_asan_opts=log_path=%T/asan.log:log_exe_name=1 not %run %T/verbose-log-path_test-binary 2> %t.out // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %T/asan.log.verbose-log-path_test-binary.* -// FIXME: only FreeBSD and Linux have verbose log paths now. +// FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now. // XFAIL: win32,android // UNSUPPORTED: ios diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt index 9b4070b0f6e..b716f89df45 100644 --- a/compiler-rt/test/sanitizer_common/CMakeLists.txt +++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt @@ -4,7 +4,7 @@ set(SANITIZER_COMMON_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) set(SANITIZER_COMMON_TESTSUITES) set(SUPPORTED_TOOLS) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD" AND NOT ANDROID) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD" AND NOT ANDROID) list(APPEND SUPPORTED_TOOLS asan) endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID) |

