summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASan] Move the sigaltstack() bits to sanitizer_common.Alexander Potapenko2014-01-281-0/+1
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. Note that this particular change doesn't enable use_sigaltstack support in every tool. llvm-svn: 200310
* [sanitizer] Fix format string mismatches found by format attributes added in ↵Evgeniy Stepanov2014-01-231-3/+3
| | | | | | r199874. llvm-svn: 199879
* [asan] add flag uar_noreserve to use noreserve mmap for fake stack. ↵Kostya Serebryany2013-12-131-0/+17
| | | | | | uar_noreserve=1 will save some memory but also negatively affect performance llvm-svn: 197233
* [sanitizer] Fix log_path behavior with StopTheWorld.Sergey Matveev2013-12-041-3/+8
| | | | | | | | | | | | | | | | Summary: Fix race on report_fd/report_fd_pid between the parent process and the tracer task. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits, kcc, dvyukov Differential Revision: http://llvm-reviews.chandlerc.com/D2306 llvm-svn: 196385
* [Sanitizer] Use more appropriate InternalScopedString in GetCodeRangeForFileAlexey Samsonov2013-12-031-4/+3
| | | | llvm-svn: 196264
* tsan: allow to obtain code range for a particular moduleDmitry Vyukov2013-09-211-0/+16
| | | | | | this is required to ignore interceptors when called from the module llvm-svn: 191149
* sanitizers: Make sure Visual Studio gets error reportsReid Kleckner2013-09-051-0/+31
| | | | | | | | | Visual Studio appears to close stderr before launching a non-console win32 program. This means we don't see any sanitizer reports. If stderr printing fails, call OutputDebugStringA to get the reports into the Visual Studio debugger console. llvm-svn: 190030
* [Sanitizer] Add the way to find binary in PATHAlexey Samsonov2013-09-031-0/+24
| | | | llvm-svn: 189799
* [ASan] Use less shadow on Win 32-bitTimur Iskhodzhanov2013-07-161-0/+18
| | | | llvm-svn: 186393
* [nolibc] Move libc-dependent sanitizer_posix.cc code to ↵Peter Collingbourne2013-05-211-92/+0
| | | | | | sanitizer_posix_libcdep.cc. llvm-svn: 182366
* [nolibc] Move GetPageSize to the individual platforms.Peter Collingbourne2013-05-201-4/+0
| | | | | | | | | GetPageSize wraps sysconf(_SC_PAGESIZE) on POSIX platforms, but sysconf resides in libc. To make this libc-independent on Linux, move the wrapper to sanitizer_mac.cc and return the Linux-specific constant EXEC_PAGESIZE in the sanitizer_linux.cc implementation. llvm-svn: 182303
* [nolibc] Move all platforms to internal_getpid.Peter Collingbourne2013-05-171-4/+0
| | | | | | | | | | Before, we had an unused internal_getpid function for Linux, and a platform-independent GetPid function. To make the naming conventions consistent for syscall-like functions, the GetPid syscall wrapper in sanitizer_posix.cc is moved to sanitizer_mac.cc, and GetPid is renamed to internal_getpid, bringing the Linux variant into use. llvm-svn: 182132
* [nolibc] Change internal syscall API to remove reliance on libc's errno.Peter Collingbourne2013-05-081-22/+26
| | | | | | | | | | | | | This change moves to a model where the error value of a system call is potentially contained in the return value itself rather than being implicit in errno. The helper function internal_iserror can be used to extract the error value from a return value. On platforms other than Linux/x86_64 this still uses errno, but other platforms are free to port their error handling to this new model. Differential Revision: http://llvm-reviews.chandlerc.com/D756 llvm-svn: 181436
* [sanitizer] Fix build breakage in Go TSan.Sergey Matveev2013-05-081-0/+2
| | | | llvm-svn: 181428
* [sanitizer] Move GetStackTrace from ASan to sanitizer_common.Sergey Matveev2013-05-081-1/+22
| | | | llvm-svn: 181424
* [Sanitizer] Kill the remainders of platform defines in favor of SANITIZER_ ↵Alexey Samsonov2013-04-031-1/+1
| | | | | | defines llvm-svn: 178627
* [libsanitizer] Unmapping the old cache partially invalidates the memory ↵Alexander Potapenko2013-03-261-5/+5
| | | | | | | | | | layout, so add a flag to skip cache update for cases when that's unacceptable (e.g. lsan). Patch by Sergey Matveev (earthdok@google.com) llvm-svn: 178000
* [sanitizer] Replace more platform checks with SANITIZER_ constants.Evgeniy Stepanov2013-03-191-1/+3
| | | | llvm-svn: 177400
* [Sanitizer] Change MemoryMappingLayout methods to also report memory ↵Alexey Samsonov2013-03-131-2/+3
| | | | | | protection flags (for future use in leak checker). Patch by Sergey Matveev. llvm-svn: 176931
* [ASan] don't call strerr from functions that map memory, since this results ↵Alexander Potapenko2013-03-111-2/+2
| | | | | | in malloc(). llvm-svn: 176800
* [Sanitizer] use raw syscall instead of _exit() function on LinuxAlexey Samsonov2013-02-201-4/+0
| | | | llvm-svn: 175622
* [Sanitizer] Make temporary filename depend on user IDAlexey Samsonov2013-02-181-0/+4
| | | | llvm-svn: 175424
* [Sanitizer] make internal_open have the same interface as libc versionAlexey Samsonov2013-02-011-1/+1
| | | | llvm-svn: 174187
* [sanitizer] make the error messages from sanitizer_common contain the actual ↵Kostya Serebryany2013-01-311-9/+11
| | | | | | tool name llvm-svn: 174059
* tsan: fix the message (tsan is not asan)Dmitry Vyukov2013-01-291-1/+1
| | | | llvm-svn: 173784
* [asan/tsan] when unmapping a chunk of user memory, apply ↵Kostya Serebryany2012-12-271-0/+4
| | | | | | madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc llvm-svn: 171144
* [sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64Kostya Serebryany2012-12-131-0/+15
| | | | llvm-svn: 170099
* tsan: dynamic history sizeDmitry Vyukov2012-11-281-1/+4
| | | | | | introduces history_size parameter that can be used to control trace size at startup llvm-svn: 168786
* [asan] get rid of some of the uses of kPageSize. The intent is to get rid of ↵Kostya Serebryany2012-11-231-4/+12
| | | | | | it completely to support platforms with multiple possible page sizes. llvm-svn: 168517
* tsan: slightly relax requirements for lazy shadow memory (can overlap and ↵Dmitry Vyukov2012-11-061-5/+6
| | | | | | | | may not be properly aligned) it's problematic on windows where allocation granularity is much larger than page size llvm-svn: 167466
* tsan: fix debug outputDmitry Vyukov2012-11-061-1/+1
| | | | llvm-svn: 167463
* tsan: better diagnostics for failed mmap()Dmitry Vyukov2012-11-061-1/+5
| | | | llvm-svn: 167462
* [Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to ↵Alexey Samsonov2012-11-021-0/+4
| | | | | | determine whether error reports are printed to terminal llvm-svn: 167298
* [asan] properly report mmap failureKostya Serebryany2012-10-041-0/+8
| | | | llvm-svn: 165214
* tsan: fix mac buildDmitry Vyukov2012-10-021-5/+0
| | | | llvm-svn: 165004
* tsan: output tid's in reportsDmitry Vyukov2012-10-021-0/+5
| | | | llvm-svn: 164998
* [Sanitizer] Hoist functions to get/set stack size and re-exec from ↵Alexey Samsonov2012-09-171-0/+14
| | | | | | memory-sanitizer branch to sanitizer_common llvm-svn: 164020
* [Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build ↵Alexey Samsonov2012-08-271-2/+2
| | | | | | by providing stub implementation llvm-svn: 162671
* [asan] better diagnostics for mmap failureKostya Serebryany2012-08-141-2/+5
| | | | llvm-svn: 161874
* tsan: Go language supportDmitry Vyukov2012-07-051-0/+4
| | | | llvm-svn: 159754
* [Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use ↵Alexey Samsonov2012-07-031-0/+12
| | | | | | 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
* tsan/asan: first try on msvc atomicsDmitry Vyukov2012-06-291-20/+0
| | | | llvm-svn: 159443
* [asan] get rid of libc's sscanf as it causes infinite recursion on Fedora. Kostya Serebryany2012-06-291-10/+0
| | | | llvm-svn: 159424
* [TSan] kill some linux-specific code in favor of code in common runtime: ↵Alexey Samsonov2012-06-181-2/+2
| | | | | | reuse wrappers for mmap routines, ProcessMaps iterator, thread stack calculation llvm-svn: 158657
* [Sanitizer] move different wrappers from TSan to common sanitizer runtimeAlexey Samsonov2012-06-181-0/+8
| | | | llvm-svn: 158655
* [Sanitizer] Use mmaped buffer in DumpProcessMaps to avoid large stack framesAlexey Samsonov2012-06-151-1/+2
| | | | llvm-svn: 158502
* [Sanitizer] move ShadowRangeIsAvailable and several defines to common runtimeAlexey Samsonov2012-06-151-0/+22
| | | | llvm-svn: 158499
* [Sanitizer] move atomic ops, min/max and sort to commnon runtimeAlexey Samsonov2012-06-151-0/+20
| | | | llvm-svn: 158496
* [Sanitizer] move more portability wrappers to common runtime: sleep, _exit, ↵Alexey Samsonov2012-06-151-0/+22
| | | | | | abort, atexit, pthread_self llvm-svn: 158493
* [Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtimeAlexey Samsonov2012-06-151-0/+27
| | | | llvm-svn: 158490
OpenPOWER on IntegriCloud