Index: lib/asan/scripts/asan_symbolize.py =================================================================== --- lib/asan/scripts/asan_symbolize.py +++ lib/asan/scripts/asan_symbolize.py @@ -280,7 +280,7 @@ 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) Index: lib/sanitizer_common/sanitizer_internal_defs.h =================================================================== --- lib/sanitizer_common/sanitizer_internal_defs.h +++ lib/sanitizer_common/sanitizer_internal_defs.h @@ -129,10 +129,6 @@ #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; Index: test/asan/TestCases/alloca_constant_size.cc =================================================================== --- test/asan/TestCases/alloca_constant_size.cc +++ 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 #else #include Index: test/asan/TestCases/atexit_stats.cc =================================================================== --- test/asan/TestCases/atexit_stats.cc +++ test/asan/TestCases/atexit_stats.cc @@ -7,7 +7,7 @@ // UNSUPPORTED: android #include -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) #include #endif int *p1 = (int*)malloc(900); Index: test/asan/TestCases/non-executable-pc.cpp =================================================================== --- test/asan/TestCases/non-executable-pc.cpp +++ 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 Index: test/asan/TestCases/verbose-log-path_test.cc =================================================================== --- test/asan/TestCases/verbose-log-path_test.cc +++ 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 Index: test/sanitizer_common/CMakeLists.txt =================================================================== --- test/sanitizer_common/CMakeLists.txt +++ test/sanitizer_common/CMakeLists.txt @@ -4,7 +4,7 @@ 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)