[compiler-rt] r312188 - Finalize ASAN/NetBSD
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 16:02:37 PDT 2017
Author: kamil
Date: Wed Aug 30 16:02:36 2017
New Revision: 312188
URL: http://llvm.org/viewvc/llvm-project?rev=312188&view=rev
Log:
Finalize ASAN/NetBSD
Summary:
This revision contains various cleanups.
Sponsored by <The NetBSD Foundation>
Reviewers: kcc, vitalybuka, joerg, eugenis
Reviewed By: kcc
Subscribers: emaste, srhines, llvm-commits, kubamracek, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D37244
Modified:
compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
compiler-rt/trunk/test/asan/TestCases/non-executable-pc.cpp
compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc
compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
Modified: compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py Wed Aug 30 16:02:36 2017
@@ -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)
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Wed Aug 30 16:02:36 2017
@@ -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;
Modified: compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc Wed Aug 30 16:02:36 2017
@@ -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>
Modified: compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc Wed Aug 30 16:02:36 2017
@@ -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);
Modified: compiler-rt/trunk/test/asan/TestCases/non-executable-pc.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/non-executable-pc.cpp?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/non-executable-pc.cpp (original)
+++ compiler-rt/trunk/test/asan/TestCases/non-executable-pc.cpp Wed Aug 30 16:02:36 2017
@@ -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>
Modified: compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc?rev=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc Wed Aug 30 16:02:36 2017
@@ -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
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=312188&r1=312187&r2=312188&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt Wed Aug 30 16:02:36 2017
@@ -4,7 +4,7 @@ set(SANITIZER_COMMON_TEST_DEPS ${SANITIZ
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)
More information about the llvm-commits
mailing list