diff options
| author | Kamil Rytarowski <n54@gmx.com> | 2019-07-11 06:22:35 +0000 |
|---|---|---|
| committer | Kamil Rytarowski <n54@gmx.com> | 2019-07-11 06:22:35 +0000 |
| commit | 983d7ddd0b278b45d815cbac9197205b39c4860a (patch) | |
| tree | 5584fe6d50a8d43f69290076b2e788bd01590922 /compiler-rt/lib/lsan/lsan_linux.cc | |
| parent | f4954b52e4c0f2f83811b788bfa2a114ca3e356b (diff) | |
| download | bcm5719-llvm-983d7ddd0b278b45d815cbac9197205b39c4860a.tar.gz bcm5719-llvm-983d7ddd0b278b45d815cbac9197205b39c4860a.zip | |
Add NetBSD LSan support
Summary:
Combine few relatively small changes into one:
- implement internal_ptrace() and internal_clone() for NetBSD
- add support for stoptheworld based on the ptrace(2) API
- define COMPILER_RT_HAS_LSAN for NetBSD
- enable tests for NetBSD/amd64
Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.
The implementation is in theory CPU independent through well defined macros
across all NetBSD ports, however only the x86_64 version was tested.
Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb
Reviewed By: vitalybuka
Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64057
llvm-svn: 365735
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_linux.cc')
| -rw-r--r-- | compiler-rt/lib/lsan/lsan_linux.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/lsan/lsan_linux.cc b/compiler-rt/lib/lsan/lsan_linux.cc index c54f41ecefb..22d034280d7 100644 --- a/compiler-rt/lib/lsan/lsan_linux.cc +++ b/compiler-rt/lib/lsan/lsan_linux.cc @@ -6,13 +6,13 @@ // //===----------------------------------------------------------------------===// // -// This file is a part of LeakSanitizer. Linux-specific code. +// This file is a part of LeakSanitizer. Linux/NetBSD-specific code. // //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_platform.h" -#if SANITIZER_LINUX +#if SANITIZER_LINUX || SANITIZER_NETBSD #include "lsan_allocator.h" @@ -29,4 +29,4 @@ void ReplaceSystemMalloc() {} } // namespace __lsan -#endif // SANITIZER_LINUX +#endif // SANITIZER_LINUX || SANITIZER_NETBSD |

