Commit Graph

81 Commits

Author SHA1 Message Date
Alexey Samsonov 39313b780d [Sanitizer] make internal_open have the same interface as libc version
llvm-svn: 174187
2013-02-01 15:58:46 +00:00
Evgeniy Stepanov 358698279d [sanitizer] Further split private and public sanitizer headers.
And make msan_interface.h C-compatible.

llvm-svn: 173928
2013-01-30 13:12:08 +00:00
Dmitry Vyukov 7f4603200f asan: fix ARM build
llvm-svn: 172613
2013-01-16 14:35:13 +00:00
Dmitry Vyukov 2854326db6 asan: correct non-temporal prefetch for memory allocator
llvm-svn: 172522
2013-01-15 09:03:20 +00:00
Dmitry Vyukov 86585ad319 asan: add memory prefetch to quarantine recycle
llvm-svn: 172216
2013-01-11 16:40:24 +00:00
Kostya Serebryany 734f1eb5f4 [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE
llvm-svn: 168424
2012-11-21 12:38:58 +00:00
Dmitry Vyukov 2817639411 tsan: define missing compier macros for windows
llvm-svn: 167450
2012-11-06 12:54:16 +00:00
Dmitry Vyukov e9bafdf5b8 tsan: fix non-msvc windows build
llvm-svn: 167449
2012-11-06 12:50:13 +00:00
Dmitry Vyukov 04dd4b7349 tasn: improve sanitizer_internal_defs.h
The file uses namespaces and extern "LANG", so it's kinda senseless to use #ifdef __cplusplus

llvm-svn: 167448
2012-11-06 12:49:22 +00:00
Dmitry Vyukov e6b5a696e3 tsan: fix windows build
__declspec is not _WIN32, it's _MSC_VER

llvm-svn: 167447
2012-11-06 12:47:42 +00:00
Kostya Serebryany 278bd2e3a3 [asan] fix lint
llvm-svn: 166006
2012-10-16 04:50:32 +00:00
Alexey Samsonov 3a0a88fe0a [Sanitizer] Add UNREACHABLE(msg) macro
llvm-svn: 165492
2012-10-09 08:42:07 +00:00
Evgeniy Stepanov 49e8576a09 [*San]: handle EINTR.
llvm-svn: 165006
2012-10-02 13:41:40 +00:00
Alexey Samsonov a555b3faf4 [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.
llvm-svn: 164486
2012-09-24 11:43:40 +00:00
Alexey Samsonov c21f901b2f [Sanitizer] fix warnings reported by gcc. Update the list of targets to check lint for
llvm-svn: 163608
2012-09-11 10:31:28 +00:00
Chandler Carruth 1aa4fef601 Relocate the external headers provided by ASan and the common sanitizer
library.

These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.

I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.

I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.

The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:

  <prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
  <prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
  <prefix>/lib/clang/X.Y/include/sanitizer/...

But maybe others have different suggestions?

Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.

llvm-svn: 162822
2012-08-29 02:27:54 +00:00
Kostya Serebryany 66a37f3aef [asan] one more fix for windows build
llvm-svn: 162762
2012-08-28 15:25:07 +00:00
Kostya Serebryany 7575968aa4 [asan] actually move StackTrace to sanitizer_common
llvm-svn: 162757
2012-08-28 14:11:57 +00:00
Kostya Serebryany ccc470c499 [asan] some renaming before we move StackTrace into sanitizer_common (part 2)
llvm-svn: 162748
2012-08-28 11:54:51 +00:00
Alexey Samsonov dc8d1f1039 [Sanitizer] move low-level (mmap-based) allocator to sanitizer_common
llvm-svn: 162663
2012-08-27 09:30:58 +00:00
Dmitry Vyukov 6fa46f7003 tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)
llvm-svn: 159437
2012-06-29 16:58:33 +00:00
Dmitry Vyukov 090f345522 tsan: prevent insertion of unwanted memset/memcpy/memcmp into runtime
llvm-svn: 159294
2012-06-27 21:00:23 +00:00
Kostya Serebryany 6e26fa9dd1 [tsan] first step in implementing a custom allocator for tsan (and msan) which saves precious shadow
llvm-svn: 158913
2012-06-21 10:04:36 +00:00
Alexey Samsonov 156958dd0c [Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime
llvm-svn: 158519
2012-06-15 13:09:52 +00:00
Alexey Samsonov 40e5128412 [Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime
llvm-svn: 158499
2012-06-15 07:29:14 +00:00
Alexey Samsonov aac5d0c831 [Sanitizer] Workaround for -Wunused-private-field warning - add an attribute in TSan unit test, and silence this warning as gtest has unused fields.
llvm-svn: 158449
2012-06-14 14:02:32 +00:00
Alexey Samsonov e95e29c2ac [Sanitizer] Make UNIMPLEMENTED macro common.
llvm-svn: 158077
2012-06-06 15:47:40 +00:00
Alexey Samsonov e428779dbf [Sanitizer] Use common CHECK machinery. Currently each tool has to define its own CheckFailed function.
llvm-svn: 158075
2012-06-06 15:22:20 +00:00
Alexey Samsonov 8bafdd020e [Sanitizer] fix Win build - ignore __attribute__((format)).
llvm-svn: 158067
2012-06-06 13:37:02 +00:00
Alexey Samsonov ee07290628 [Sanitizer] Move more functions/constants to sanitizer_common.
llvm-svn: 158056
2012-06-06 09:26:25 +00:00
Alexey Samsonov 5bbf8290a7 [Sanitizer] rename sanitizer_defs.h to sanitizer_internal_defs.h
llvm-svn: 158001
2012-06-05 14:25:27 +00:00