Commit Graph

35 Commits

Author SHA1 Message Date
Alexey Samsonov 5c6b93bc33 [Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks
llvm-svn: 163603
2012-09-11 09:44:48 +00:00
Alexey Samsonov ceffb021c5 [Sanitizer] Remove implicit conversion of InternalScopedBuffer<T> to T*
llvm-svn: 163197
2012-09-05 07:23:44 +00:00
Kostya Serebryany d0d96bfb86 [asan/tsan] use InternalScopedBuffer instead of stack arrays. Use mmap inseted of InternalAlloc in InternalScopedBuffer
llvm-svn: 162834
2012-08-29 08:40:36 +00:00
Kostya Serebryany bb6f165952 [asan] get rid of AsanPrintf in favor of Printf from sanitizer_common
llvm-svn: 162746
2012-08-28 11:34:40 +00:00
Alexey Samsonov d1d1a814b7 [Sanitizer] align allocation sizes in low level allocator
llvm-svn: 162676
2012-08-27 14:51:36 +00:00
Alexey Samsonov e67a5dd8e1 [Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done
llvm-svn: 162673
2012-08-27 14:04:54 +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
Alexey Samsonov 75e5fc3e57 [TSan] switch tsan to using InternalScopedBuffer from sanitizer_common
llvm-svn: 162351
2012-08-22 07:25:52 +00:00
Alexey Samsonov e6704ee109 [Sanitizer] define InternalScopedBuffer to replace large arrays on stack. It is defined analogous to similar class in tsan and should replace it.
llvm-svn: 162262
2012-08-21 08:13:37 +00:00
Alexey Samsonov d77fbba74a [Sanitizer] implement straightforward nlogn sorting, as qsort() may call malloc, which leads to deadlock in ASan allocator
llvm-svn: 160262
2012-07-16 11:27:17 +00:00
Dmitry Vyukov 03d32ecd4f tsan: Go language support
llvm-svn: 159754
2012-07-05 16:18:28 +00:00
Alexey Samsonov 961276af26 [Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.
llvm-svn: 159652
2012-07-03 08:24:14 +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 c598de93bd tsan: remove internal allocator, switch to sanitizer_common one.
llvm-svn: 159142
2012-06-25 15:09:24 +00:00
Kostya Serebryany 5b01415dc0 [tsan] more code for a specialized tsan allocator
llvm-svn: 158991
2012-06-22 13:00:50 +00:00
Alexey Samsonov e1cb524226 [Sanitizer] Renaming: SNPrintf -> internal_snprintf (and move it to sanitizer libc)
llvm-svn: 158710
2012-06-19 09:21:57 +00:00
Alexey Samsonov 58a3c58ec9 [Sanitizer] move different wrappers from TSan to common sanitizer runtime
llvm-svn: 158655
2012-06-18 08:44:30 +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 e4a889866d [Sanitizer] move atomic ops, min/max and sort to commnon runtime
llvm-svn: 158496
2012-06-15 07:00:31 +00:00
Alexey Samsonov 70afb91636 [Sanitizer] move more portability wrappers to common runtime: sleep, _exit, abort, atexit, pthread_self
llvm-svn: 158493
2012-06-15 06:37:34 +00:00
Alexey Samsonov ae1e171b72 [Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtime
llvm-svn: 158490
2012-06-15 06:08:19 +00:00
Alexey Samsonov c70d1086f6 [Sanitizer] move rest of mmap routines to common sanitizer runtime
llvm-svn: 158452
2012-06-14 14:42:58 +00:00
Alexey Samsonov 0c53a38abb [Sanitizer] move portable GetEnv to common sanitizer runtime
llvm-svn: 158451
2012-06-14 14:07:21 +00:00
Alexey Samsonov 3a6ddb86e8 [Sanitizer] Allocator for internal runtime purposes. Currently it calls libcmalloc, but we might have to make it more low-level in future
llvm-svn: 158142
2012-06-07 08:52:56 +00:00
Alexey Samsonov cf4d3a027d [Sanitizer] Fix mac build.
llvm-svn: 158141
2012-06-07 07:32:00 +00:00
Alexey Samsonov 4b1f1031e6 [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.
llvm-svn: 158140
2012-06-07 07:13:46 +00:00
Alexey Samsonov fe44fbd750 [Sanitizer] Move ReadFileToBuffer to sanitizer_common.
llvm-svn: 158138
2012-06-07 05:38:26 +00:00
Kostya Serebryany c0bbfbfba2 [asan] more allocator compaction
llvm-svn: 158082
2012-06-06 16:33:46 +00:00
Alexey Samsonov 40d5b772e5 [Sanitizer] Switch to common mmap/munmap routines in ASan run-time.
llvm-svn: 158078
2012-06-06 16:15:07 +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 d323f4e78e [Sanitizer] Remove __attribute__((format))
llvm-svn: 158070
2012-06-06 13:58:39 +00:00
Alexey Samsonov 51ae983718 [Sanitizer]: Introduce a common internal printf function. For now, also use tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms).
llvm-svn: 158065
2012-06-06 13:11:29 +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 bc3a7e3fe2 [Sanitizer] add sanitizer_common.h for routines shared between TSan and ASan runtimes. Use __sanitizer::Die() in TSan.
llvm-svn: 158050
2012-06-06 06:47:26 +00:00