summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] use getrusage as an alternative to reading /proc/self/statm. Also ↵Kostya Serebryany2015-01-291-27/+0
| | | | | | move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself) llvm-svn: 227416
* [ASan] Handle SIGBUS on Linux.Jay Foad2015-01-121-1/+1
| | | | | | | | | | | | | | | | | | Summary: On Linux in some situations we can get SIGBUS instead of SIGSEGV on stack overflow, so asan should handle SIGBUS as well as SIGSEGV. https://code.google.com/p/address-sanitizer/issues/detail?id=369 Reviewers: samsonov, glider Reviewed By: glider Subscribers: glider, llvm-commits Differential Revision: http://reviews.llvm.org/D6923 llvm-svn: 225630
* [TSan] Fix Go build.Alexey Samsonov2015-01-071-0/+6
| | | | llvm-svn: 225336
* [sanitizer] mmap2 syscall works with 4096-byte units instead of bytes.Evgeniy Stepanov2014-12-241-3/+5
| | | | | | Ouch. llvm-svn: 224819
* [Sanitizer] Fix GetRSS on Linux with non-4k pagesJay Foad2014-12-181-2/+2
| | | | | | | | | | | | | | | | | Summary: The numbers in /proc/self/statm are in pages, not in fixed 4k units. This fixes Linux/hard_rss_limit_mb_test.cc on my PowerPC64 box which has 64k pages. Reviewers: kcc, willschm Reviewed By: willschm Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6717 llvm-svn: 224522
* [asan] new flag: hard_rss_limit_mbKostya Serebryany2014-12-161-0/+15
| | | | llvm-svn: 224353
* internal_stat for mips64Mohit K. Bhakkad2014-12-161-0/+39
| | | | llvm-svn: 224326
* tsan: fix Go buildDmitry Vyukov2014-12-111-2/+1
| | | | | | GetRSS is used in Go build. llvm-svn: 224023
* [asan] move GetRSS from tsan to sanitizer_commonKostya Serebryany2014-12-091-0/+28
| | | | llvm-svn: 223730
* Add missing #include to fix Android build.Alexey Samsonov2014-12-021-0/+1
| | | | llvm-svn: 223157
* sanitizer_common: fix function w/o returnDmitry Vyukov2014-11-211-4/+2
| | | | | | When SANITIZER_USES_CANONICAL_LINUX_SYSCALLS the function misses return statement. llvm-svn: 222532
* Fix -Wcast-qual warnings in sanitizersAlexey Samsonov2014-11-131-1/+1
| | | | llvm-svn: 221936
* Removed r221896, it seems to break build in various ways.Yury Gribov2014-11-131-7/+23
| | | | llvm-svn: 221912
* [ASan] Add process basename to log name and error message to simplify ↵Yury Gribov2014-11-131-23/+7
| | | | | | | | analysis of sanitized systems logs. Reviewed at http://reviews.llvm.org/D5724 llvm-svn: 221896
* [asan] Delay system log initialization on Android.Evgeniy Stepanov2014-09-151-0/+8
| | | | | | | Writing to system log requires libc interceptors to be initialized. Fixes crashes with verbosity=1 on newer Android builds. llvm-svn: 217764
* Fix getting environment variables for sanitizers needs on FreeBSDViktor Kutuzov2014-07-101-8/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D4229 llvm-svn: 212690
* tsan: fix freebsd buildDmitry Vyukov2014-06-201-0/+7
| | | | | | freebsd does not have /proc/self/environ llvm-svn: 211417
* tsan: remove unused header includeDmitry Vyukov2014-06-201-1/+0
| | | | llvm-svn: 211385
* Support getting executable's name for sanitizers needs on FreeBSDViktor Kutuzov2014-05-291-1/+11
| | | | llvm-svn: 209805
* [Sanitizer] Always prefer cached contents of /proc/self/exe if it's availableAlexey Samsonov2014-05-281-13/+12
| | | | llvm-svn: 209773
* [asancov] Write coverage directly to a memory-mapped file.Evgeniy Stepanov2014-05-271-15/+16
| | | | | | | | | | | This way does not require a __sanitizer_cov_dump() call. That's important on Android, where apps can be killed at arbitrary time. We write raw PCs to disk instead of module offsets; we also write memory layout to a separate file. This increases dump size by the factor of 2 on 64-bit systems. llvm-svn: 209653
* On AArch64, use clone() instead of fork()Greg Fitzgerald2014-05-261-0/+4
| | | | | | | | Patch by Gideon Billings. Differential Revision: http://reviews.llvm.org/D3903 llvm-svn: 209641
* [sanitizer] fix linux_dirent for SANITIZER_X32; based on patch by H.J. LuKostya Serebryany2014-05-211-0/+5
| | | | llvm-svn: 209281
* Cast pointers to uptr when calling internal_syscallKostya Serebryany2014-05-211-2/+3
| | | | | | | | | For Linux/x86-64, pointers passed to internal_syscall should be casted to uptr first. Otherwise, they won't be properly extended to 64-bit for x32. Patch by H.J. Lu llvm-svn: 209278
* [sanitizer] Fix go build following r209121.Sergey Matveev2014-05-191-1/+1
| | | | llvm-svn: 209136
* [sanitizer] Support sandboxing in sanitizer coverage.Sergey Matveev2014-05-191-1/+2
| | | | | | | | | | | Summary: Sandboxed code may now pass additional arguments to __sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a single file (the default is one file per module). The user may supply a file or socket to write to. The latter option can be used to broker out the file writing functionality. If -1 is passed, we pre-open a file. llvm-svn: 209121
* [libsanitizer] Fix the return type of internal_forkAlexander Potapenko2014-05-131-1/+1
| | | | llvm-svn: 208714
* [libsanitizer] Use internal_fork() to spawn the symbolizer process.Alexander Potapenko2014-05-131-0/+4
| | | | | | This should fix https://code.google.com/p/thread-sanitizer/issues/detail?id=61 llvm-svn: 208707
* Remove sanitizer_linux_libcdep.cc from TSan-Go buildAlexey Samsonov2014-03-071-0/+11
| | | | llvm-svn: 203238
* [FreeBSD] Port sanitizers' syscalls.Alexey Samsonov2014-03-071-61/+120
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 203227
* [asan] Fix printing of long reports to logcat on Android.Evgeniy Stepanov2014-02-261-1/+12
| | | | | | | __android_log_write has an implicit message length limit. Print one line at a time. llvm-svn: 202250
* [sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan RouxKostya Serebryany2014-02-131-2/+38
| | | | llvm-svn: 201303
* [asan] Read extra flags from a system property on activation on Android.Evgeniy Stepanov2014-01-311-0/+6
| | | | llvm-svn: 200550
* [ASan] Move the SIGSEGV/SIGBUS handling to sanitizer_commonAlexander Potapenko2014-01-311-0/+5
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. This particular CL moves InstallSignalHandlers() into sanitizer_common (making it InstallDeadlySignalHandlers()), but doesn't enable default signal handlers for any tool other than ASan. llvm-svn: 200542
* Fix compilation: don't convert NULL to a pointer-incompatible type.Alexander Potapenko2014-01-311-2/+2
| | | | llvm-svn: 200536
* Make signal-related functions use __sanitizer_* structures instead of ↵Alexander Potapenko2014-01-311-13/+50
| | | | | | | | | | | __sanitizer_kernel_* ones. Also rename internal_sigaction() into internal_sigaction_norestorer(), as this function doesn't fully implement the sigaction() functionality on Linux. This change is a part of refactoring intended to have common signal handling behavior in all tools. llvm-svn: 200535
* [asan] Android logging.Evgeniy Stepanov2014-01-231-0/+15
| | | | | | This change duplicates all ASan output to system log on Android. llvm-svn: 199887
* [Sanitizer] Move OS-specific code for MemoryMappingLayout into separate ↵Alexey Samsonov2013-12-251-207/+0
| | | | | | source files. llvm-svn: 198003
* [asan] attempting to fix x32 build (see ↵Kostya Serebryany2013-11-061-27/+29
| | | | | | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59018) llvm-svn: 194155
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | This moves away from creating the symbolizer object and initializing the external symbolizer as separate steps. Those steps now always take place together. Sanitizers with a legacy requirement to specify their own symbolizer path should use InitSymbolizer to initialize the symbolizer with the desired path, and GetSymbolizer to access the symbolizer. Sanitizers with no such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for initialization. The symbolizer interface has been made thread-safe (as far as I can tell) by protecting its member functions with mutexes. Finally, the symbolizer interface no longer relies on weak externals, the introduction of which was probably a mistake on my part. Differential Revision: http://llvm-reviews.chandlerc.com/D1985 llvm-svn: 193448
* Use internal_memset to initialize this variable.Peter Collingbourne2013-10-211-1/+2
| | | | | | | Otherwise, the compiler may use memset in non-optimized builds, which is forbidden in the nolibc part of the runtime. llvm-svn: 193098
* tsan: move kernel struct definition from sanitizer_linux.h to ↵Dmitry Vyukov2013-10-151-8/+8
| | | | | | sanitizer_platform_limits_posix.h llvm-svn: 192695
* tsan: implement internal syscall-based versions of sigaction/sigprocmaskDmitry Vyukov2013-10-151-0/+25
| | | | | | | use them in stoptheworld fixes applications that intercept sigaction/sigprocmask llvm-svn: 192686
* [sanitizer] Do not break the CFI unwind chain in clone().Sergey Matveev2013-10-081-3/+3
| | | | | | | | | Fixes build on clang 3.2, which doesn't support cfi_undefined. This change doesn't seem to break the slow unwinder. Even if it does, the worst thing that could happen is that we would not see a backtrace when a fatal error happens under StopTheWorld. llvm-svn: 192196
* Check the function we just called for errors, not an incoming argument. NoticedNick Lewycky2013-09-171-1/+1
| | | | | | by inspection. llvm-svn: 190828
* [TSan] Use --whole-archive around TSan runtime in old TSan makefiles. Fix a ↵Alexey Samsonov2013-09-111-0/+2
| | | | | | Go build llvm-svn: 190513
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-101-1/+34
| | | | | | functions. Move some code around to get rid of extra source files llvm-svn: 190410
* [libsanitizer] Remove an unused variable introduced in r189789Alexander Potapenko2013-09-031-1/+0
| | | | llvm-svn: 189790
* [TSan] Move the /proc/self/maps parsing logic to sanitizer_common Alexander Potapenko2013-09-031-0/+48
| | | | | | Provide a generic way for the tools to generate memory profiles from contents of /proc/self/maps llvm-svn: 189789
* [sanitizer_common] Add internal_clone().Sergey Matveev2013-09-021-0/+63
| | | | | | | | | | | Add a wrapper for the clone syscall for use in StopTheWorld. We implement it only for x86_64, so stop building StopTheWorld for other platforms (no one uses it outside x86_64 anyway). See https://code.google.com/p/address-sanitizer/issues/detail?id=214 for why we can't use the glibc clone() wrapper. llvm-svn: 189753
OpenPOWER on IntegriCloud