summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_posix_libcdep.cc
AgeCommit message (Collapse)Author
2017-11-27[fuchsia] Update Fuchsia with a new mmap implementation.Kostya Kortchinsky
Summary: Now that the sanitizer_common interface for MmapNoAccess / MmapFixed have been refactored to allow a more OO-esque access pattern, update the Fuchsia mmap implementation to take advantage of this. Previously MmapNoAccess / MmapFixed relied on a global allocator_vmar, since the sanitizer_allocator only called MmapNoAccess once. Now, we create a new VMAR per ReservedAddressRange object. This allows the sanitizer allocator to work in tandem with the Scudo secondary allocator. This is part 4 of a 4 part changeset: * part 1 https://reviews.llvm.org/D38593 * part 2 https://reviews.llvm.org/D38592 * part 3 https://reviews.llvm.org/D38593 Reviewers: mcgrathr, cryptoad Reviewed By: cryptoad Subscribers: alekseyshl, mcgrathr, kubamracek, mehdi_amini Differential Revision: https://reviews.llvm.org/D38595 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[sanitizer] Update scudo to use new APIKostya Kortchinsky
Summary: The ScudoAllocator uses a SecondaryHeader to keep track of the size and base address of each mmap'd chunk. This aligns well with what the ReservedAddressRange is trying to do. This changeset converts the scudo allocator from using the MmapNoAccess/MmapFixed APIs to the ReservedAddressRange::Init and ::Map APIs. In doing so, it replaces the SecondayHeader struct with the ReservedAddressRange object. This is part 3 of a 4 part changeset; part 1 https://reviews.llvm.org/D39072 and part 2 https://reviews.llvm.org/D38592 Reviewers: alekseyshl, mcgrathr, cryptoad, phosek Reviewed By: cryptoad Subscribers: llvm-commits, cryptoad, kubamracek Differential Revision: https://reviews.llvm.org/D38593 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07Update sanitizer_allocator to use new API.Kostya Kortchinsky
Summary: Update sanitizer_allocator to use new API. Second patch in a series. First patch https://reviews.llvm.org/D39072 Updates MmapNoAccess / MmapFixed call sites in the saniziter_allocator to use the new Init/Map APIs instead. Reviewers: alekseyshl, cryptoad, phosek, mcgrathr, dvyukov Reviewed By: alekseyshl, cryptoad Subscribers: dvyukov, mcgrathr, kubamracek Differential Revision: https://reviews.llvm.org/D38592 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30Introduce ReservedAddressRange to sanitizer_common.Kostya Kortchinsky
Summary: Fixed version of https://reviews.llvm.org/D38437 (fixes Win/Fuchsia failures). Creating a new revision, since the old one was getting a bit old/crowded. In Fuchsia, MmapNoAccess/MmapFixedOrDie are implemented using a global VMAR, which means that MmapNoAccess can only be called once. This works for the sanitizer allocator but *not* for the Scudo allocator. Hence, this changeset introduces a new ReservedAddressRange object to serve as the new API for these calls. In this changeset, the object still calls into the old Mmap implementations. The next changeset two changesets will convert the sanitizer and scudo allocators to use the new APIs, respectively. (ReservedAddressRange will replace the SecondaryHeader in Scudo.) Finally, a last changeset will update the Fuchsia implementation. Reviewers: alekseyshl, cryptoad, phosek Reviewed By: alekseyshl, cryptoad Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D39072 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316934 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12Revert r315533 "Reland "[sanitizer] Introduce ReservedAddressRange to ↵Hans Wennborg
sanitizer_common"" The SanitizerCommon.ReservedAddressRangeUnmap test fails on Windows: FAIL: SanitizerCommon-Unit :: ./Sanitizer-x86_64-Test.exe/SanitizerCommon.ReservedAddressRangeUnmap (34003 of 35554) ******************** TEST 'SanitizerCommon-Unit :: ./Sanitizer-x86_64-Test.exe/SanitizerCommon.ReservedAddressRangeUnmap' FAILED ******************** Note: Google Test filter = SanitizerCommon.ReservedAddressRangeUnmap [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SanitizerCommon [ RUN ] SanitizerCommon.ReservedAddressRangeUnmap ==3780==ERROR: SanitizerTool failed to deallocate 0x1000 (4096) bytes at address 0x0000000c3000 (error code: 487) ==3780==Sanitizer CHECK failed: E:\b\build\slave\win_upload_clang\build\src\third_party\llvm\projects\compiler-rt\lib\sanitizer_common\sanitizer_win.cc:129 (("unable to unmap" && 0)) != (0) (0, 0) ******************** Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 299.76s ******************** Failing Tests (1): SanitizerCommon-Unit :: ./Sanitizer-x86_64-Test.exe/SanitizerCommon.ReservedAddressRangeUnmap > In Fuchsia, MmapNoAccess/MmapFixedOrDie are implemented using a global > VMAR, which means that MmapNoAccess can only be called once. This works > for the sanitizer allocator but *not* for the Scudo allocator. > > Hence, this changeset introduces a new ReservedAddressRange object to > serve as the new API for these calls. In this changeset, the object > still calls into the old Mmap implementations. > > The next changeset two changesets will convert the sanitizer and scudo > allocators to use the new APIs, respectively. (ReservedAddressRange will > replace the SecondaryHeader in Scudo.) > > Finally, a last changeset will update the Fuchsia implementation. > > Patch by Julia Hansbrough > > Differential Revision: https://reviews.llvm.org/D38437 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11Reland "[sanitizer] Introduce ReservedAddressRange to sanitizer_common"Petr Hosek
In Fuchsia, MmapNoAccess/MmapFixedOrDie are implemented using a global VMAR, which means that MmapNoAccess can only be called once. This works for the sanitizer allocator but *not* for the Scudo allocator. Hence, this changeset introduces a new ReservedAddressRange object to serve as the new API for these calls. In this changeset, the object still calls into the old Mmap implementations. The next changeset two changesets will convert the sanitizer and scudo allocators to use the new APIs, respectively. (ReservedAddressRange will replace the SecondaryHeader in Scudo.) Finally, a last changeset will update the Fuchsia implementation. Patch by Julia Hansbrough Differential Revision: https://reviews.llvm.org/D38437 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315533 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11Revert "[sanitizer] Introduce ReservedAddressRange to sanitizer_common"Petr Hosek
This reverts commit r315493 which is failing to build on sanitizer-windows. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315494 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11[sanitizer] Introduce ReservedAddressRange to sanitizer_commonPetr Hosek
In Fuchsia, MmapNoAccess/MmapFixedOrDie are implemented using a global VMAR, which means that MmapNoAccess can only be called once. This works for the sanitizer allocator but *not* for the Scudo allocator. Hence, this changeset introduces a new ReservedAddressRange object to serve as the new API for these calls. In this changeset, the object still calls into the old Mmap implementations. The next changeset two changesets will convert the sanitizer and scudo allocators to use the new APIs, respectively. (ReservedAddressRange will replace the SecondaryHeader in Scudo.) Finally, a last changeset will update the Fuchsia implementation. Patch by Julia Hansbrough Differential Revision: https://reviews.llvm.org/D38759 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315493 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18[sanitizer] Move StartReportDeadlySignal into sanitizer_common_libcdepVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313518 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-17[compiler-rt] Fix build break after r313277 on s390xUlrich Weigand
Commit r313277 moved IsStackOverflow to inside the SignalContext class, but didn't update a code block in #ifdef s390x accordingly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313480 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14[sanitizer] Move IsStackOverflow into SignalContextVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13[compiler-rt] Add siginfo into SignalContextVitaly Buka
Summary: Information stored there is often been passed along with SignalContext. Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37792 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313167 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13Fix line breaks.Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313118 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13[compiler-rt] Move *Sanitizer:DEADLYSIGNAL printing into common partVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37764 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313115 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13[compiler-rt] Move IsStackOverflow into sanitizer_posix_libcdep.cc to the restVitaly Buka
of instrumentation code. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28Add NetBSD specific version of sanitizer_platform_limits_posixKamil Rytarowski
Summary: NetBSD is an Open-Source POSIX-like BSD Operating System. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, filcab, fjricci Reviewed By: kcc Subscribers: llvm-commits, kubamracek, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37193 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-21Revert "[compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka
allow_user_segv_handler is true." Summary: On Android we still need to reset preinstalled handlers and allow use handlers later. This reverts commit r304039. Reviewers: eugenis Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D34434 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305871 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02[sanitizer-coverage] nuke more stale codeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304504 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26[compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka
allow_user_segv_handler is true. Reviewers: eugenis, kcc Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32457 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304039 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25[compiler-rt] Replace allow_user_segv_handler=0 with kHandleSignalExclusiveVitaly Buka
Summary: allow_user_segv_handler had confusing name did not allow to control behavior for signals separately. Reviewers: eugenis, alekseyshl, kcc Subscribers: llvm-commits, dberris, kubamracek Differential Revision: https://reviews.llvm.org/D33371 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13Don't assume PTHREAD_CREATE_JOINABLE is 0 on all systemsFrancis Ricci
Summary: Lsan was using PTHREAD_CREATE_JOINABLE/PTHREAD_CREATE_DETACHED as truthy values, which works on Linux, where the values are 0 and 1, but this fails on OS X, where the values are 1 and 2. Set PTHREAD_CREATE_DETACHED to the correct value for a given system. Reviewers: kcc, glider, kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31883 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30Release memory to OS only when the requested range covers the entire pageEvgeniy Stepanov
Summary: The current code was sometimes attempting to release huge chunks of memory due to undesired RoundUp/RoundDown interaction when the requested range is fully contained within one memory page. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D27228 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28tsan: always define SANITIZER_GODmitry Vyukov
Currently we either define SANITIZER_GO for Go or don't define it at all for C++. This works fine with preprocessor (ifdef/ifndef/defined), but does not work for C++ if statements (e.g. if (SANITIZER_GO) {...}). Also this is different from majority of SANITIZER_FOO macros which are always defined to either 0 or 1. Always define SANITIZER_GO to either 0 or 1. This allows to use SANITIZER_GO in expressions and in flag default values. Also remove kGoMode and kCppMode, which were meant to be used in expressions, but they are not defined in sanitizer_common code, so SANITIZER_GO become prevalent. Also convert some preprocessor checks to C++ if's or ternary expressions. Majority of this change is done mechanically with: sed "s#ifdef SANITIZER_GO#if SANITIZER_GO#g" sed "s#ifndef SANITIZER_GO#if \!SANITIZER_GO#g" sed "s#defined(SANITIZER_GO)#SANITIZER_GO#g" git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285443 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-08Fix tsan-go build.Evgeniy Stepanov
Disable the new abort-in-SIGABRT code under SANITIZER_GO. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07[sanitizer] Fix a conflict between abort_on_error and handle_abort.Evgeniy Stepanov
Reset the SIGABRT signal handler before calling abort(). Also, change the error message when catching SIGABRT to say "ABRT" instead of "SEGV". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26[asan] first attempt at releasing free-d memory back to the system using ↵Kostya Serebryany
madvise. Requires quite some tuning. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28[esan] Add handling of large stack size rlimitsDerek Bruening
Summary: Adds detection of large stack size rlimits (over 1 TB or unlimited), which results in an mmap location that our shadow mapping does not support. We re-exec the application in this situation. Adds a test of this behavior. Adds general detection of mmap regions outside of our app regions. In the future we want to try to adaptively handle these but for now we abort. Moves the existing Linux-specific mmap code into a platform-specific file where the new rlimit code lives. Reviewers: eugenis Subscribers: vitalybuka, zhaoqin, kcc, aizatsky, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D20745 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-23[sanitizer] add a function MmapNoAccess that mmaps a protected region ↵Kostya Serebryany
*somewhere*; use MmapNoAccess in the Allocator when SpaceBeg is not a constant. In this mode the allocator will be a bit more hardened git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22[sanitizer] rename MmapNoAccess to MmapFixedNoAccess; NFCKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22[sanitizer] revert r267203 as it breaks aarch64 botsKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22[sanitizer] allow zero first parameter in MmapNoAccess; This is a part of ↵Kostya Serebryany
r267094 that has been reverted git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22Revert "[sanitizer] Allow the sanitizer allocator to use a non-fixed address ↵Renato Golin
range. An allocator with a non-fixed address range will be attack-resistan. NFC for the sanitizers at this point." This reverts commit r267094, because it broke a lot of MSAN tests in AArch64. Being NFC and all, this needs some deeper investigation before it goes in again. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22[sanitizer] Allow the sanitizer allocator to use a non-fixed address range. ↵Kostya Serebryany
An allocator with a non-fixed address range will be attack-resistan. NFC for the sanitizers at this point. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02[asan] Add iOS support.Anna Zaks
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[sanitizers] generating html report on coverage dumpMike Aizatsky
Subscribers: tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D16374 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[sanitizers] using execv instead of execve with null env.Mike Aizatsky
Differential Revision: http://reviews.llvm.org/D16646 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[sanitizers] extracted process management functionsMike Aizatsky
Differential Revision: http://reviews.llvm.org/D16546 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258849 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15[asan] add option: handle_sigillKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255588 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12tsan: fix Go build on linuxDmitry Vyukov
librt is not linked in in Go build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-03Reapply r251918 ("[tsan] Fix build errors for TSan on OS X").Kuba Brecka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-03Revert r251918 ("[tsan] Fix build errors for TSan on OS X").Kuba Brecka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-03[tsan] Fix build errors for TSan on OS XKuba Brecka
This patch moves a few functions from `sanitizer_linux_libcdep.cc` to `sanitizer_posix_libcdep.cc` in order to use them on OS X as well. Plus a few more small build fixes. This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point. Differential Revision: http://reviews.llvm.org/D14235 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251918 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30[sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar
- Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248964 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06[sanitizer] 2-nd attempt. Add the flag handle_sigfpe that is default true to ↵Kostya Serebryany
handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski. This time the test is enabled only on x86-64 (it broke on ARM) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244234 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-06Revert "[sanitizer] Add the flag handle_sigfpe that is default true to ↵Renato Golin
handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski" This reverts commit r244136, it was breaking the ARM bots for too long. We should investigate it offline. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244210 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05[sanitizer] Add the flag handle_sigfpe that is default true to handle SIGFPE ↵Kostya Serebryany
crashes same as SIGSEV crashes, patch by Karl Skomski git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23[sanitizer] Implement logging to syslog.Evgeniy Stepanov
Previously, Android target had a logic of duplicating all sanitizer output to logcat. This change extends it to all posix platforms via the use of syslog, controlled by log_to_syslog flag. Enabled by default on Android, off everywhere else. A bit of cmake magic is required to allow Printf() to call a libc function. I'm adding a stub implementation to support no-libc builds like dfsan and safestack. This is a second attempt. I believe I've fixed all the issues that prompted the revert: Mac build, and all kinds of non-CMake builds (there are 3 of those). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23Revert r242975.Evgeniy Stepanov
Breaks Mac build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242978 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22[sanitizer] Implement logging to syslog.Evgeniy Stepanov
Previously, Android target had a logic of duplicating all sanitizer output to logcat. This change extends it to all posix platforms via the use of syslog, controlled by log_to_syslog flag. Enabled by default on Android, off everywhere else. A bit of cmake magic is required to allow Printf() to call a libc function. I'm adding a stub implementation to support no-libc builds like dfsan and safestack. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242975 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-04[asan] Fix undefined MAP_NORESERVE on FreeBSD.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238995 91177308-0d34-0410-b5e6-96231b3b80d8