Commit Graph

52 Commits

Author SHA1 Message Date
Evgeniy Stepanov 5697b58ec4 [sanitizer] Move GetTlsSize code from TSan to sanitizer_common.
llvm-svn: 176938
2013-03-13 08:19:53 +00:00
Alexey Samsonov db7d9656bb [Sanitizer] Implement BlockingMutex::CheckLocked()
llvm-svn: 176805
2013-03-11 15:45:20 +00:00
Alexey Samsonov aadd1f2ad6 [Sanitizer] use raw syscall instead of _exit() function on Linux
llvm-svn: 175622
2013-02-20 13:54:32 +00:00
Alexey Samsonov 9211bd33ec [Sanitizer] Make temporary filename depend on user ID
llvm-svn: 175424
2013-02-18 07:17:12 +00:00
Timur Iskhodzhanov 167f9e4395 [ASan] Switch Windows to allocator v2, also fixing some build errors
llvm-svn: 174707
2013-02-08 12:02:00 +00:00
Dmitry Vyukov fa67ed47e1 asan/tsan: fix failing CHECK on windows
llvm-svn: 174319
2013-02-04 10:42:38 +00:00
Alexey Samsonov 2c5cbd2b38 [Sanitizer] extend internal libc with stat/fstat/lstat functions
llvm-svn: 174316
2013-02-04 10:16:50 +00:00
Dmitry Vyukov 7981ea8baa asan/tsan: fix compilation errors/bugs on Windows where long is 32-bit even in 64-bit mode
llvm-svn: 174312
2013-02-04 08:07:45 +00:00
Alexey Samsonov 4985b8766e [Sanitizer] use u32 instead of mode_t, which is defined in Darwin headers
llvm-svn: 174189
2013-02-01 16:32:18 +00:00
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
Dmitry Vyukov ff19809a3d asan: fix windows build
llvm-svn: 172415
2013-01-14 14:28:06 +00:00
Dmitry Vyukov f22982bf0a asan/tsan: move blocking mutex from asan to sanitizer_common
llvm-svn: 172380
2013-01-14 07:51:39 +00:00
Alexey Samsonov 35ed02ebf1 [Sanitizer] add missing header on Windows
llvm-svn: 170514
2012-12-19 08:51:39 +00:00
Alexey Samsonov b6219c060b [Sanitizer] implement internal_isatty on Windows
llvm-svn: 170507
2012-12-19 07:57:42 +00:00
Kostya Serebryany a167087571 [asan] fix windows build
llvm-svn: 170101
2012-12-13 05:51:02 +00:00
Kostya Serebryany 9806628792 [sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64
llvm-svn: 170099
2012-12-13 05:36:00 +00:00
Alexander Potapenko 1746f555ee Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should be used by
the client programs to notify the tools that sandboxing is about to be turned on.

llvm-svn: 169732
2012-12-10 13:10:40 +00:00
Kostya Serebryany f22c697f58 [asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
llvm-svn: 168517
2012-11-23 15:38:49 +00:00
Alexey Samsonov ae9b18b607 [Sanitizer] add sanity checks for communication with external symbolizer
llvm-svn: 167617
2012-11-09 14:45:30 +00:00
Alexey Samsonov c463f3077e [Sanitizer] try to fix Windows bot - include stdlib.h for abort/_exit functions
llvm-svn: 167577
2012-11-08 13:08:41 +00:00
Dmitry Vyukov 0ff6d2dd6c tsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement sched_yield()
llvm-svn: 167452
2012-11-06 13:19:59 +00:00
Alexey Samsonov 58358897a3 [Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal
llvm-svn: 167298
2012-11-02 15:18:34 +00:00
Alexey Samsonov 20ba98fdb1 [Sanitizer] Use kStderrFd constant instead of hardcoded 2
llvm-svn: 167291
2012-11-02 09:38:47 +00:00
Alexey Samsonov 83ecabe6e6 [Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro
llvm-svn: 165493
2012-10-09 08:51:08 +00:00
Alexey Samsonov 97ca306641 [Sanitizer] Hoist functions to get/set stack size and re-exec from memory-sanitizer branch to sanitizer_common
llvm-svn: 164020
2012-09-17 09:12:39 +00:00
Alexey Samsonov f6d2125829 [Sanitizer] implement readlink as syscall on Linux
llvm-svn: 163213
2012-09-05 14:48:24 +00:00
Alexey Samsonov 28d8be2d86 [Sanitizer] One more try to fix Windows build
llvm-svn: 162674
2012-08-27 14:08:53 +00:00
Alexey Samsonov ef7758f561 [Sanitizer] move OS-dependent pieces of symbolizer to separate source files
llvm-svn: 161862
2012-08-14 13:00:32 +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 3c5c9e7774 tsan/asan: third try on msvc atomics
llvm-svn: 159449
2012-06-29 18:37:45 +00:00
Dmitry Vyukov e8cee12ce2 tsan/asan: first try on msvc atomics
llvm-svn: 159443
2012-06-29 18:00:38 +00:00
Kostya Serebryany d32d537d63 [asan] get rid of libc's sscanf as it causes infinite recursion on Fedora.
llvm-svn: 159424
2012-06-29 13:05:36 +00:00
Kostya Serebryany 98390d0b71 [tsan] a bit more lint and Makefile changes to run tests from sanitizer_common
llvm-svn: 158821
2012-06-20 15:19:17 +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 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 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 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 e95e29c2ac [Sanitizer] Make UNIMPLEMENTED macro common.
llvm-svn: 158077
2012-06-06 15:47:40 +00:00
Alexey Samsonov 201aa367fc [ASan] fix win build - add missing header
llvm-svn: 158057
2012-06-06 09:43:32 +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 ca2b5d7abb [Sanitizer] move internal_filesize and internal_dup2 from TSan to sanitizer_common.
llvm-svn: 158052
2012-06-06 07:30:33 +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
Alexey Samsonov 7ac77d6b29 [Sanitizer] add sanitizer_posix.cc. Move more various functions into sanitizer_libc: sscanf, munmap, memchr
llvm-svn: 157994
2012-06-05 09:49:25 +00:00
Alexey Samsonov 03c8b846c4 [Sanitizer] add internal_{close,read,write} functions to sanitizer_libc
llvm-svn: 157990
2012-06-05 08:32:53 +00:00