summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
Commit message (Collapse)AuthorAgeFilesLines
* [ASan] Distinguish between read, write and read-write file access modes in ↵Alexander Potapenko2015-03-231-1/+1
| | | | | | | | OpenFile. This is to fix mapping coverage files into memory on OSX. llvm-svn: 232936
* [Sanitizer] Remove multiline comment to silence GCC warning. NFC.Alexey Samsonov2015-02-201-2/+1
| | | | llvm-svn: 229948
* [LSan] [MIPS] adding support of LSan for mips64/mips64el archMohit K. Bhakkad2015-02-191-2/+41
| | | | | | | | | | | | Patch by Sagar Thakur Reviewers: petarj, earthdok, kcc. Subscribers: samsonov, dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7013 llvm-svn: 229830
* tsan: fix freebsd buildDmitry Vyukov2015-02-161-0/+2
| | | | | | GetTls is not defined in Go mode. llvm-svn: 229395
* [Sanitizer] Fix checking for weak function presence.Alexey Samsonov2015-02-021-2/+2
| | | | llvm-svn: 227851
* Revert "Remove unused function."Alexey Samsonov2015-01-311-0/+13
| | | | | | This reverts commit r227633. SetEnv was prematurely deleted. llvm-svn: 227665
* [TSan] Fix Go build.Alexey Samsonov2015-01-301-1/+12
| | | | llvm-svn: 227634
* Remove unused function.Alexey Samsonov2015-01-301-11/+0
| | | | llvm-svn: 227633
* [asan] use getrusage as an alternative to reading /proc/self/statm. Also ↵Kostya Serebryany2015-01-291-0/+39
| | | | | | move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself) llvm-svn: 227416
* [sanitizer] Update descriptor size for glibc 2.13.Sergey Matveev2015-01-231-0/+2
| | | | | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=361 It's still not clear whether the values are correct in all cases, but at least this should unbreak our bots. llvm-svn: 226938
* Replace InternalScopedBuffer<char> with InternalScopedString where applicable.Alexey Samsonov2014-12-021-4/+3
| | | | | | | | | | | | | | | | Summary: No functionality change. Test Plan: make check-all Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6472 llvm-svn: 223164
* [msan] Remove MSanDR and supporting code.Evgeniy Stepanov2014-11-181-10/+2
| | | | | | | | | | MSanDR is a dynamic instrumentation tool that can instrument the code (prebuilt libraries and such) that could not be instrumented at compile time. This code is unused (to the best of our knowledge) and unmaintained, and starting to bit-rot. llvm-svn: 222232
* Fix -Wcast-qual warnings in sanitizersAlexey Samsonov2014-11-131-1/+2
| | | | llvm-svn: 221936
* [Sanitizer] Get rid of Symbolizer::Get() and Symbolizer::GetOrNull().Alexey Samsonov2014-09-101-2/+1
| | | | | | | | | We may as well just use Symbolizer::GetOrInit() in all the cases. Don't call Symbolizer::Get() early in tools initialization: these days it doesn't do any important setup work, and we may as well create the symbolizer the first time it's actually needed. llvm-svn: 217558
* Fix building sanitizer_linux_libcdep.cc on FreeBSDViktor Kutuzov2014-09-041-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D5166 llvm-svn: 217148
* [libsanitizer] Fix the Android build.Alexander Potapenko2014-09-011-0/+4
| | | | llvm-svn: 216885
* [ASan] Small refactoring - split the slow unwinding logic into ↵Alexander Potapenko2014-09-011-126/+0
| | | | | | | | | sanitizer_unwind_posix.cc This allows the slow unwinder to be used on OSX (it's disabled for now, see https://code.google.com/p/address-sanitizer/issues/detail?id=137 for details) llvm-svn: 216877
* Support traversing ELF objects for sanitizers needs on FreeBSD in 32-bit modeViktor Kutuzov2014-07-251-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D4656 llvm-svn: 213940
* [asan] Fix unused variable warning.Evgeniy Stepanov2014-07-031-1/+1
| | | | llvm-svn: 212272
* [asan] Exclude non-executable mappings from coverage.Evgeniy Stepanov2014-06-111-1/+2
| | | | llvm-svn: 210649
* [asancov] Write coverage directly to a memory-mapped file.Evgeniy Stepanov2014-05-271-0/+15
| | | | | | | | | | | 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
* [sanitizer] define SANITIZER_X32 and use it in ThreadDescriptorSize; ↵Kostya Serebryany2014-05-211-1/+3
| | | | | | partially based on patch by H.J. Lu llvm-svn: 209279
* Move pthread_cond_* interceptors from sanitizer_common with all the ugly ↵Alexey Samsonov2014-04-161-12/+0
| | | | | | hacks to TSan llvm-svn: 206423
* A fix for sanitizers' TLS support on FreeBSDViktor Kutuzov2014-03-241-6/+15
| | | | llvm-svn: 204595
* [sanitizer] Fix a bug in AdjustStackSize().Sergey Matveev2014-03-181-2/+3
| | | | | | | If the user requests OS default stack size, do not adjust it to our minimum stack size (which is usually much less than the OS default). llvm-svn: 204173
* tsan: yet another attempt to fix pthread_cond interceptorsDmitry Vyukov2014-03-171-1/+1
| | | | | | | | | | | Make behavior introduced in r202820 conditional (under legacy_pthread_cond flag). The new issue that we've hit with the satellite pthread_cond_t struct is that pthread_condattr_getpshared does not work (satellite data is not shared between processes). The idea is that most processes do not use pthread 2.2.5. The rare ones that use (2.2.5 is dated by 2002) must specify legacy_pthread_cond=1 on their own risk. llvm-svn: 204032
* [sanitizer] make real_pthread_attr_getstack extern "C"Kostya Serebryany2014-03-171-0/+2
| | | | llvm-svn: 204029
* tsan: fix handling of pthread_cond_wait in presence of pthread_cancelDmitry Vyukov2014-03-121-0/+12
| | | | | | | | | if the thread is cancelled in pthread_cond_wait, it locks the mutex before processing pthread_cleanup stack but tsan was missing that, thus reporting false double-lock/wrong-unlock errors see the test for details llvm-svn: 203648
* Remove sanitizer_linux_libcdep.cc from TSan-Go buildAlexey Samsonov2014-03-071-20/+1
| | | | llvm-svn: 203238
* [FreeBSD] Add support for sanitizer_linux_libcdep.ccAlexey Samsonov2014-03-071-17/+73
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 203235
* Avoid doing any work when unwinding stack traces with 0 or 1 frameAlexey Samsonov2014-03-041-6/+4
| | | | llvm-svn: 202837
* AdjustStackSizeLinux() is used in Lsan, Tsan and Msan non-Linux-specific ↵Kostya Serebryany2014-02-241-1/+1
| | | | | | | | | code so it seems it should have more generic name and moved to a common scope. Renamed to AdjustStackSize. Patch by Viktor Kutuzov. llvm-svn: 202011
* [sanitizer] Fix off-by-one-line in SEGV reports on Android.Evgeniy Stepanov2014-02-131-1/+3
| | | | | | This will be covered by null_deref.cc test (requires one more fix to pass). llvm-svn: 201325
* [Sanitizer] Reduce stack frame size of SlowUnwindStackWithContextAlexey Samsonov2014-02-121-4/+4
| | | | llvm-svn: 201212
* [sanitizer] Use system unwinder in signal handlers on Android.Evgeniy Stepanov2014-02-111-0/+70
| | | | | | | | | | Because of the way Bionic sets up signal stack frames, libc unwinder is unable to step through it, resulting in broken SEGV stack traces. Luckily, libcorkscrew.so on Android implements an unwinder that can start with a signal context, thus sidestepping the issue. llvm-svn: 201151
* [sanitizer] hide two functions in the __sanitizer namespace to avoid ↵Kostya Serebryany2014-02-051-14/+10
| | | | | | exporting them (gold complained) llvm-svn: 200844
* [sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in ↵Kostya Serebryany2014-02-041-9/+36
| | | | | | http://gcc.gnu.org/PR60038, the hardcoded sizeof(struct thread); patch by Jakub Jelinek llvm-svn: 200733
* [libsanitizer] Workaround for ↵Alexander Potapenko2014-02-031-1/+0
| | | | | | | | https://code.google.com/p/address-sanitizer/issues/detail?id=261 If pthread_get_stacksize_np() returns 512K for the main thread on Mavericks, obtain the stack size from the current stack rlimit. llvm-svn: 200703
* [libsanitizer] Fix compilation for gotsan.Alexander Potapenko2014-01-311-1/+1
| | | | llvm-svn: 200549
* [ASan] Move the SIGSEGV/SIGBUS handling to sanitizer_commonAlexander Potapenko2014-01-311-1/+10
| | | | | | | 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
* tsan: fix Go buildDmitry Vyukov2013-12-311-0/+7
| | | | | | | Currently fails with: gotsan.cc:7686:40: error: the address of 'int __sanitizer_pthread_attr_getstack(void*, void**, size_t*)' will always evaluate as 'true' [-Werror=address] llvm-svn: 198261
* Fix an ODR violation in the sanitizer runtimes.Chandler Carruth2013-12-301-5/+11
| | | | | | | | | | | | | | | A helper function is a C++ function, and so even though one of the two definitions is weak, it still technically triggers the ODR. Perhaps these two definitions are ODR equivalent, but I'm not even confident in that. Instead, just define the function once, declare it as weak, and use a wrapper that is clearly file-local. This avoids two definitions. Also make the function extern "C" so that we can't even mess up the type signature somehow or otherwise fail to match up the weak declaration here with the interceptor defined elsewhere. llvm-svn: 198253
* [Sanitizer] Teach MemoryMappingLayout to dump all loaded modules.Alexey Samsonov2013-12-251-1/+2
| | | | | | | Use this to implement GetListOfModules() on Mac and on Android (on Linux we use dl_iterate_phdr). llvm-svn: 198004
* [msan] Wrap indirect calls to REAL(x) in interceptors.Evgeniy Stepanov2013-12-201-0/+2
| | | | llvm-svn: 197806
* [msan] Replace wrap_indirect_calls runtime flag with an interface method.Evgeniy Stepanov2013-12-201-3/+2
| | | | llvm-svn: 197799
* [sanitizer] Disable call wrapping when building for Go.Evgeniy Stepanov2013-12-131-0/+2
| | | | llvm-svn: 197232
* [msan] Wrap indirect calls from sanitizer rtl when running under DR.Evgeniy Stepanov2013-12-131-2/+9
| | | | llvm-svn: 197226
* [sanitizer] Introduce VReport and VPrintf macros and use them in sanitizer code.Sergey Matveev2013-12-051-3/+3
| | | | | | Instead of "if (common_flags()->verbosity) Report(...)" we now have macros. llvm-svn: 196497
* Call real pthread_attr_getstack instead of the interceptorKostya Serebryany2013-11-221-2/+8
| | | | | | | | | | | | | | | | Summary: Call real pthread_attr_getstack instead of the interceptor when we do intercept pthread_attr_getstack. Reviewers: samsonov, eugenis Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2237 llvm-svn: 195441
* [Sanitizer] Make slow unwinder on Linux more robustAlexey Samsonov2013-11-151-1/+1
| | | | llvm-svn: 194805
OpenPOWER on IntegriCloud