summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r324847, there's bot failures.Kuba Mracek2018-02-116-82/+93
| | | | llvm-svn: 324849
* [sanitizer] Implement NanoTime() on DarwinKuba Mracek2018-02-111-2/+12
| | | | | | | | Currently NanoTime() on Darwin is unimplemented and always returns 0. Looks like there's quite a few things broken because of that (TSan periodic memory flush, ASan allocator releasing pages back to the OS). Let's fix that. Differential Revision: https://reviews.llvm.org/D40665 llvm-svn: 324847
* [compiler-rt] Replace forkpty with posix_spawnKuba Mracek2018-02-116-93/+82
| | | | | | | | | | On Darwin, we currently use forkpty to communicate with the "atos" symbolizer. There are several problems that fork or forkpty has, e.g. that after fork, interceptors are still active and this sometimes causes crashes or hangs. This is especially problematic for TSan, which uses interceptors for OS-provided locks and mutexes, and even Libc functions use those. This patch replaces forkpty with posix_spawn. Since posix_spawn doesn't fork (at least on Darwin), the interceptors are not a problem. Additionally, this also fixes a latent threading problem with ptsname (it's unsafe to use this function in multithreaded programs). Yet another benefit is that we'll handle post-fork failures (e.g. sandbox disallows "exec") gracefully now. Differential Revision: https://reviews.llvm.org/D40032 llvm-svn: 324846
* [scudo] Allow options to be defined at compile timeKostya Kortchinsky2018-02-081-0/+3
| | | | | | | | | | | | | | | | Summary: Allow for options to be defined at compile time, like is already the case for other sanitizers, via `SCUDO_DEFAULT_OPTIONS`. Reviewers: alekseyshl, dberris Reviewed By: alekseyshl, dberris Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42980 llvm-svn: 324620
* Correct a bug in GetArgsAndEnv() for NetBSDKamil Rytarowski2018-02-071-2/+1
| | | | | | Fix setting envp. llvm-svn: 324481
* [Sanitizers, Darwin] Disable SANITIZER_SUPPORTS_WEAK_HOOKS before Mac OS X 10.9Vitaly Buka2018-02-051-1/+7
| | | | | | | | | | | | | | | | | | Summary: Before Xcode 4.5, undefined weak symbols don't work reliably on Darwin: https://stackoverflow.com/questions/6009321/weak-symbol-link-on-mac-os-x Therefore this patch disables their use before Mac OS X 10.9 which is the first version only supported by Xcode 4.5 and above. Reviewers: glider, kcc, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41346 llvm-svn: 324284
* [sanitizer] Revert rL324263Kostya Kortchinsky2018-02-051-3/+2
| | | | | | | | | | | | | | Summary: The 32-bit division breaks SizeClassAllocator64PopulateFreeListOOM which uses Primary that has a maximum size > 32-bit. Reviewers: alekseyshl Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42928 llvm-svn: 324268
* [sanitizer] SizeClassMap minor improvement/correctness changesKostya Kortchinsky2018-02-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In `ClassID`, make sure we use an unsigned as based for the `lbits` shift. The previous code resulted in spurious sign extensions like for x64: ``` add esi, 0FFFFFFFFh movsxd rcx, esi and rcx, r15 ``` The code with the `U` added is: ``` add esi, 0FFFFFFFFh and rsi, r15 ``` And for `MaxCachedHint`, use a 32-bit division instead of `64-bit`, which is faster (https://lemire.me/blog/2017/11/16/fast-exact-integer-divisions-using-floating-point-operations/) and already used in other parts of the code (64-bit `GetChunkIdx`, 32-bit `GetMetaData` enforce 32-bit divisions) Not major performance gains by any mean, but they don't hurt. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42916 llvm-svn: 324263
* [sanitizer] Allocator local cache improvementsKostya Kortchinsky2018-02-051-34/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Here are a few improvements proposed for the local cache: - `InitCache` always read from `per_class_[1]` in the fast path. This was not ideal as we are working with `per_class_[class_id]`. The latter offers the same property we are looking for (eg: `max_count != 0` means initialized), so we might as well use it and keep our memory accesses local to the same `per_class_` element. So change `InitCache` to take the current `PerClass` as an argument. This also makes the fast-path assembly of `Deallocate` a lot more compact; - Change the 32-bit `Refill` & `Drain` functions to mimic their 64-bit counterparts, by passing the current `PerClass` as an argument. This saves some array computations; - As far as I can tell, `InitCache` has no place in `Drain`: it's either called from `Deallocate` which calls `InitCache`, or from the "upper" `Drain` which checks for `c->count` to be greater than 0 (strictly). So remove it there. - Move the `stats_` updates to after we are done with the `per_class_` accesses in an attempt to preserve locality once more; - Change some `CHECK` to `DCHECK`: I don't think the ones changed belonged in the fast path and seemed to be overly cautious failsafes; - Mark some variables as `const`. The overall result is cleaner more compact fast path generated code, and some performance gains with Scudo (and likely other Sanitizers). Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42851 llvm-svn: 324257
* Handle NetBSD symbol mangling devname -> __devname50Kamil Rytarowski2018-02-051-0/+1
| | | | llvm-svn: 324240
* Add new NetBSD interceptors: devname(3), devname_r(3)Kamil Rytarowski2018-02-022-0/+35
| | | | | | | | | | | | | | | | | | | Summary: devname, devname_r - get device name Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42053 llvm-svn: 324120
* Correct the return value of strlcat(3) in the interceptorKamil Rytarowski2018-02-021-5/+4
| | | | | | | | | Late fix for SVN r. 324034 Add new interceptors: strlcpy(3) and strlcat(3) There was forgotten an addition of len to the return value. llvm-svn: 324091
* Add new interceptors: strlcpy(3) and strlcat(3)Kamil Rytarowski2018-02-012-1/+37
| | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD ships with strlcpy(3) and strlcat(3), a safe replacement of strcpy(3) and strcat(3). Hide both functions under SANITIZER_INTERCEPT_STRLCPY. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42061 llvm-svn: 324034
* [sanitizer] Implement NanoTime & MonotonicNanoTime for WindowsKostya Kortchinsky2018-02-012-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Implement `MonotonicNanoTime` using `QueryPerformanceCounter`. This function is used by Scudo & the 64-bit Primary allocator. Implementing it now means that the release-to-OS mechanism of the Primary will kick in (it never did since the function returned 0 always), but `ReleaseMemoryPagesToOS` is still not currently implemented for Windows. Performance wise, this adds a syscall & a 64-bit division per call to `MonotonicNanoTime` so the impact might not be negligible, but I don't think there is a way around it. Reviewers: rnk, alekseyshl, amccarth Reviewed By: alekseyshl, amccarth Subscribers: amccarth, flowerhack, kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42579 llvm-svn: 324011
* [sanitizer] Fix tests on Android and DarwinVitaly Buka2018-01-301-3/+10
| | | | llvm-svn: 323834
* [sanitizer] Add interceptors for readlinkat, name_to_handle_at, ↵Vitaly Buka2018-01-303-0/+109
| | | | | | | | | | | | | | | | | | | | | open_by_handle_at Summary: Also move existing readlink msan interceptor to sanitizer_common. Fixes google/sanitizers#908 Patch by Oliver Chang Reviewers: vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42630 llvm-svn: 323825
* [sanitizer] Update from zx_time_get to zx_clock_getPetr Hosek2018-01-271-2/+2
| | | | | | | | This Zircon syscall was renamed. Differential Revision: https://reviews.llvm.org/D42617 llvm-svn: 323611
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-261-1/+1
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323510
* [sanitizer] Implement GetNumberOfCPUs for WindowsKostya Kortchinsky2018-01-251-2/+3
| | | | | | | | | | | | | | | | | Summary: Implement `GetNumberOfCPUs` using `GetNativeSystemInfo`. The only consummer of this function is Scudo which is not functional on Windows yet. Reviewers: rnk, zturner Reviewed By: zturner Subscribers: zturner, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42547 llvm-svn: 323462
* Break a line into <= 80 charactersKamil Rytarowski2018-01-231-1/+2
| | | | llvm-svn: 323279
* Add a new interceptor: paccept(2)Kamil Rytarowski2018-01-232-0/+25
| | | | | | | | | | | | | | | | | | | Summary: paccept(2) is a NetBSD-specific variation of accept(2). Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42052 llvm-svn: 323273
* Reland "Fix syntax error introduced in r322991"Petr Hosek2018-01-201-2/+2
| | | | | | | | This triggers compiler error when building sanitizers for Fuchsia. Differential Revision: https://reviews.llvm.org/D42328 llvm-svn: 323029
* Revert "[sanitizer] Fix syntax error introduced in r322991"Petr Hosek2018-01-201-2/+2
| | | | | | This reverts commit r323027: it breaks the SanitizerLintCheck. llvm-svn: 323028
* [sanitizer] Fix syntax error introduced in r322991Petr Hosek2018-01-201-2/+2
| | | | | | | | This triggers compiler error when building sanitizers for Fuchsia. Differential Revision: https://reviews.llvm.org/D42328 llvm-svn: 323027
* Support the localtime interceptor for NetBSDKamil Rytarowski2018-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: The localtime symbol is mangled to __locatime50 on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42045 llvm-svn: 323019
* Intercept accept4() on NetBSDKamil Rytarowski2018-01-201-1/+1
| | | | | | | | | | | | | | | | | | | Summary: The accept4() function first appeared in NetBSD 8.0. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42046 llvm-svn: 323018
* [sanitizer] Allow Fuchsia to use getauxvalKostya Kortchinsky2018-01-191-3/+4
| | | | | | | | | | | | | | | | | Summary: Fuchsia has `getauxval` (https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/include/sys/auxv.h, https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/src/misc/getauxval.c) so set SANITIZER_USE_GETAUXVAL to 1 for this platform. Reviewers: alekseyshl, flowerhack Reviewed By: flowerhack Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42315 llvm-svn: 323002
* Reland "Make TracePcGuardController linker-initialized"Petr Hosek2018-01-191-6/+6
| | | | | | | | | | It was always intended to be. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D41513 llvm-svn: 322991
* Correct typo after r322829Kamil Rytarowski2018-01-191-2/+2
| | | | llvm-svn: 322947
* Break a line into two linesKamil Rytarowski2018-01-181-1/+2
| | | | | | This should restore the rule of <=80 characters per line. llvm-svn: 322841
* Add new NetBSD interceptors: getgrouplist(3) & getgroupmembership(3)Kamil Rytarowski2018-01-182-0/+42
| | | | | | | | | | | | | | | | | | | Summary: getgrouplist, getgroupmembership -- calculate group access list Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42064 llvm-svn: 322836
* Add new interceptors: access(2), faccessat(2)Kamil Rytarowski2018-01-182-0/+30
| | | | | | | | | | | | | | | | | | | Summary: access, faccessat - check access permissions of a file or pathname Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42065 llvm-svn: 322831
* Add new interceptors for pwcache(3)-style functionsKamil Rytarowski2018-01-182-0/+72
| | | | | | | | | | | | | | | | | | | | | Summary: From <pwd.h>: user_from_uid, uid_from_user From <grp.h>: group_from_gid, gid_from_group Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42068 llvm-svn: 322829
* [Sanitizers] Make common allocator agnostic to failure handling modes.Alex Shlyapnikov2018-01-175-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make common allocator agnostic to failure handling modes and move the decision up to the particular sanitizer's allocator, where the context is available (call stack, parameters, return nullptr/crash mode etc.) It simplifies the common allocator and allows the particular sanitizer's allocator to generate more specific and detailed error reports (which will be implemented later). The behavior is largely the same, except one case, the violation of the common allocator's check for "size + alignment" overflow is now reportied as OOM instead of "bad request". It feels like a worthy tradeoff and "size + alignment" is huge in this case anyway (thus, can be interpreted as not enough memory to satisfy the request). There's also a Report() statement added there. Reviewers: eugenis Subscribers: kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42198 llvm-svn: 322784
* Add new interceptor: acct(2)Kamil Rytarowski2018-01-172-0/+16
| | | | | | | | | | | | | | | | | | | Summary: acct - enable or disable process accounting Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42066 llvm-svn: 322646
* [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274)Kamil Rytarowski2018-01-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch (on top of the previous two (https://reviews.llvm.org/D40898 and https://reviews.llvm.org/D40899) complete the compiler-rt side of the the Solaris sanitizer port. It contains the following sets of changes: * For the time being, the port is for 32-bit x86 only, so reject the various tests on x86_64. * When compiling as C++, <setjmp.h> resp. <iso/setjmp_iso.h> only declares _setjmp and _longjmp inside namespace std. * MAP_FILE is a Windows feature. While e.g. Linux <sys/mman.h> provides a no-op compat define, Solaris does not. * test/asan/TestCases/Posix/coverage.cc was initially failing like this: /vol/gcc/src/llvm/llvm/local/projects/compiler-rt/lib/sanitizer_common/scripts/sancov.py: 4 files merged; 2 PCs total rm: cannot remove '/var/gcc/llvm/local/projects/compiler-rt/test/asan/I386SunOSConfig/TestCases/Posix/Output/coverage': Invalid argument Further digging revealed that the rm was trying to remove the running test's working directory which failed as observed. cd'ing out of the dir before let the test pass. * Two tests needed a declaration of alloca. I've now copied the existing code from test/asan/TestCases/alloca_constant_size.cc, but it may be more profitable and maintainable to have a common testsuite header where such code is collected. * Similarly, Solaris' printf %p format doesn't include the leading 0x. * In test/asan/TestCases/malloc-no-intercept.c, I had to undef __EXTENSIONS__ (predefined by clang for no apparent reason) to avoid conflicting declarations for memalign. * test/ubsan/TestCases/Float/cast-overflow.cpp has different platform dependent ways to define BYTE_ORDER and friends. Why not just use __BYTE_ORDER__ and friends as predefined by clang and gcc? Patch by Rainer Orth. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, mgorny, krytarowski, fedor.sergeev, JDevlieghere, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40900 llvm-svn: 322635
* Revert "[SanitizerCoverage][Fuchsia] Make TracePcGuardController ↵Petr Hosek2018-01-131-6/+6
| | | | | | | | linker-initialized" This reverts commit r322424: this broke the tsan lint check. llvm-svn: 322428
* [SanitizerCoverage][Fuchsia] Make TracePcGuardController linker-initializedPetr Hosek2018-01-131-6/+6
| | | | | | | | | | It was always intended to be. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D41513 llvm-svn: 322424
* Correct the setitimer interceptor on NetBSDKamil Rytarowski2018-01-124-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: itimerval can contain padding that may be legitimately uninitialized. On NetBSD there are four integers of type "long, int, long, int", the int argument stands for __sanitizer_suseconds_t. Compiler adds extra padding in this layout. Check every field of struct itimerval separately. Define __sanitizer_suseconds_t as long on FreeBSD, Linux and SmartOS, and int on NetBSD. Define __sanitizer_timeval and __sanitizer_itimerval. Sponsored by <The NetBSD Foundation> Reviewers: eugenis, joerg, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41502 llvm-svn: 322399
* lib Fuzzer FreeBSD supportKamil Rytarowski2018-01-121-1/+1
| | | | | | | | | | | | | | Summary: Patch by David CARLIER Reviewers: vitalybuka, kcc, dim, emaste, davide, morehouse, george.karpenkov Reviewed By: morehouse Subscribers: george.karpenkov, kubamracek, srhines, mgorny, emaste, krytarowski Differential Revision: https://reviews.llvm.org/D41642 llvm-svn: 322380
* [asan] Fix build with Android NDK < 14.Evgeniy Stepanov2018-01-041-1/+1
| | | | | | | | | | | | NDK < 13 & API_LEVEL < 21 do not define struct mmsghdr. Newer NDK use unified headers and provide this definition for all api levels. Since we can not check for the NDK version, check the api level. This is more strict than absolutely necessary, but it does not really matter: it is only a sanity check. llvm-svn: 321817
* [tsan] Separate the constants in libignore and bump the maximum for ↵Kuba Mracek2018-01-042-5/+7
| | | | | | | | | | instrumented libraries We're having some use cases where we have more than 128 (the current maximum) instrumented dynamic libraries loaded into a single process. Let's bump the limit to 1024, and separate the constants. Differential Revision: https://reviews.llvm.org/D41190 llvm-svn: 321782
* [msan] Intercept sendmmsg, recvmmsg.Evgeniy Stepanov2018-01-034-2/+70
| | | | | | | | | | | | Summary: Extend the sendmsg test to cover all recv*. Reviewers: vitalybuka Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D41620 llvm-svn: 321774
* [msan] Intercept pthread_getname_np.Evgeniy Stepanov2017-12-282-0/+17
| | | | llvm-svn: 321544
* [Sanitizers] Export aligned new/delete from runtimes.Alex Shlyapnikov2017-12-231-0/+20
| | | | | | | | | | | | | | | | Summary: Export aligned new/delete to make dynamic runtimes work again. Remove all valid new/delete cases from ASan test, there's a test in common for that. Reviewers: eugenis Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41548 llvm-svn: 321394
* Reland "[mips][compiler-rt] Provide 64bit atomic add and sub"Simon Dardis2017-12-223-73/+125
| | | | | | | | | | | | | | | | | r318733 introduced a build failure for native MIPS32 systems for xray due to the lack of __sync_fetch_and_add / __syn_fetch_and_sub support. This patch extends the existing support providing atomics so that xray can be successfully built. The initial patch was reverted in r321292, as I suspected it may have caused the buildbot failure. Another patch in the updates the bot fetched caused the test failures which was reverted. Reviewers: atanasyan, dberris Differential Revision: https://reviews.llvm.org/D40385 llvm-svn: 321383
* [Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274)Alex Shlyapnikov2017-12-223-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch, on top of https://reviews.llvm.org/D40898, contains the build system changes necessary to enable the Solaris/x86 sanitizer port. The only issue of note is the libclang_rt.sancov_{begin, end} libraries: clang relies on the linker automatically defining __start_SECNAME and __stop_SECNAME labels for sections whose names are valid C identifiers. This is a GNU ld extension not present in the ELF gABI, also implemented by gold and lld, but not by Solaris ld. To work around this, I automatically link the sancov_{begin,end} libraries into every executable for now. There seems to be now way to build individual startup objects like crtbegin.o/crtend.o, so I've followed the lead of libclang_rt.asan-preinit which also contains just a single object. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, mgorny, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40899 llvm-svn: 321373
* Revert "[mips][compiler-rt] Provide 64bit atomic add and sub"Simon Dardis2017-12-213-125/+73
| | | | | | | | | | | This reverts commit r321260. It appears to have broken the sanitizer bot sanitizer-ppc64be-linux. http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/5029 Reverting to see if the buildbot turns green. llvm-svn: 321292
* [mips][compiler-rt] Provide 64bit atomic add and subSimon Dardis2017-12-213-73/+125
| | | | | | | | | | | | | r318733 introduced a build failure for native MIPS32 systems for xray due to the lack of __sync_fetch_and_add / __syn_fetch_and_sub support. This patch extends the existing support providing atomics so that xray can be successfully built. Reviewers: atanasyan, dberris Differential Revision: https://reviews.llvm.org/D40385 llvm-svn: 321260
* [asan] Add interceptor for printf_chkMaxim Ostapenko2017-12-182-0/+46
| | | | | | | | | | | | There could be a situation when a specific DSO was built with FORTIFY_SOURCE option. In case asan-ed binary link against that DSO, libasan can't handle the possible memory error because it does not have interceptors for spinrtf_chk, snprintf_chk, vprintf_chk, vsnprintf_chk, __fprintf_chk functions. Let's interceptors for them. Patch by Denis Khalikov. Differential Revision: https://reviews.llvm.org/D40951 llvm-svn: 320990
OpenPOWER on IntegriCloud