summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-07-21Remove Bitrig: CompilerRT ChangesErich Keane
Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned. Differential Revision: https://reviews.llvm.org/D35709 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-21[XRay][compiler-rt] Update test to account for change in logging format.Dean Michael Berris
Fixes build breakage for some bots after we've started logging both the process id and the thread id. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308701 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[tsan] Update unittest for logging changes of r308637Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308660 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[asan] Update unittest for changes in logging r308637Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308647 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[compiler-rt] Include thread ID into sanitizers logsVitaly Buka
Reviewers: kcc, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D35654 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308637 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-18[Sanitizers] ASan/MSan/LSan allocators set errno on failure.Alex Shlyapnikov
Summary: ASan/MSan/LSan allocators set errno on allocation failures according to malloc/calloc/etc. expected behavior. MSan allocator was refactored a bit to make its structure more similar with other allocators. Also switch Scudo allocator to the internal errno definitions. TSan allocator changes will follow. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35275 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308344 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-16[asan] Disable not working new test on WindowsVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308123 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-16[msan] Add missing include for fix test on WindowsVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-16[tsan] Disable test with debug runtimeVitaly Buka
Test expects at least -O1 compiled runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308121 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-14[Sanitizers] ASan and LSan allocator set errno on failure.Alex Shlyapnikov
Summary: Set proper errno code on alloction failures and change some implementations to satisfy their man-specified requirements: LSan: valloc and memalign ASan: pvalloc, memalign and posix_memalign Changing both allocators in one patch since LSan depends on ASan allocator in some configurations. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35440 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-14[Sanitizers] LSan allocator set errno on failure.Alex Shlyapnikov
Set proper errno code on alloction failures and change valloc and memalign implementations to satisfy their man-specified requirements. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-14[Sanitizers] Scudo allocator set errno on failure.Alex Shlyapnikov
Summary: Set proper errno code on alloction failure and change pvalloc and posix_memalign implementation to satisfy their man-specified requirements. Reviewers: cryptoad Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35429 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13[ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" ↵Vedant Kumar
(compiler-rt) Compiler-rt changes associated with: D34121 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307956 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13Fix broken testXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12[asan] Avoid recompilation of the same code in the testVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307868 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12[PGO] Add a test for 2-deep loop nestXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12Add explicit CMake targets for ASan/TSan iOS Simulator testing and update ↵Kuba Mracek
the instructions how to run them. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307844 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12tsan: add test for __tsan_java_findDmitry Vyukov
The test should have been added in 289682 "tsan: allow Java VM iterate over allocated objects" but I forgot to avn add. Author: Alexander Smundak (asmundak) Reviewed in https://reviews.llvm.org/D27720 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307776 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10Fix-up for r307537: We need to #include stdint.h to get int32_t.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10Fixup whitespace.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307538 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10[tsan] Add support for running TSan tests on iOS simulator and devicesKuba Mracek
Differential Revision: https://reviews.llvm.org/D35157 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307537 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07Revert r307342, r307343.Evgeniy Stepanov
Revert "Copy arguments passed by value into explicit allocas for ASan." Revert "[asan] Add end-to-end tests for overflows of byval arguments." Build failure on lldb-x86_64-ubuntu-14.04-buildserver. Test failure on clang-cmake-aarch64-42vma and sanitizer-x86_64-linux-android. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07[asan] Add end-to-end tests for overflows of byval arguments.Evgeniy Stepanov
Included is one test for passing structs by value and one test for passing C++ objects by value. Patch by Matt Morehouse. Differential revision: https://reviews.llvm.org/D34827 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-05[tsan] Use pthread_sigmask instead of sigprocmask to block signals in a ↵Kuba Mracek
thread on Darwin On Darwin, sigprocmask changes the signal mask for the entire process. This has some unwanted consequences, because e.g. internal_start_thread wants to disable signals only in the current thread (to make the new thread inherit the signal mask), which is currently broken on Darwin. This patch switches to pthread_sigmask. Differential Revision: https://reviews.llvm.org/D35016 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307212 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-03fix trivial typos in comments; NFCHiroshi Inoue
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-01fix trivial typo; NFCHiroshi Inoue
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-01[asan] This Android lit workaround should not be needed as bug is fixedVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-01[asan] Fix test on Android i686/fuguVitaly Buka
printf from .preinit_array may crash. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306940 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[asan] Disable test which fails on Android x86Vitaly Buka
Other Android CPUs probably pass just by luck as ulimit was not executed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[LSan] Make LSan allocator allocator_may_return_null compliantAlex Shlyapnikov
Summary: An attempt to reland D34786 (which caused bot failres on Mac), now with properly intercepted operators new() and delete(). LSan allocator used to always return nullptr on too big allocation requests (the definition of "too big" depends on platform and bitness), now it follows policy configured by allocator_may_return_null flag Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34845 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[objc] Don't require null-check and don't emit memset when result is ignored ↵Kuba Mracek
for struct-returning method calls [compiler-rt part] This fixes an issue with the emission of lifetime markers for struct-returning Obj-C msgSend calls. When the result of a struct-returning call is ignored, the temporary storage is only marked with lifetime markers in one of the two branches of the nil-receiver-check. The check is, however, not required when the result is unused. If we still need to emit the check (due to consumer arguments), let's not emit the memset to zero out the result if it's unused. This fixes a use-after-scope false positive with AddressSanitizer. Differential Revision: https://reviews.llvm.org/D34834 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306838 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30fix trivial typos, NFCHiroshi Inoue
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306807 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[profile] Move __llvm_profile_filename into a separate objectVedant Kumar
Users can specify the path a raw profile is written to by passing -fprofile-instr-generate=<path>, but this functionality broke on Darwin after __llvm_profile_filename was made weak [1], resulting in profiles being written to "default.profraw" even when <path> is specified. The situation is that instrumented programs provide a weak definition of __llvm_profile_filename, which conflicts with a weak redefinition provided by the profiling runtime. The linker appears to pick the 'winning' definition arbitrarily: on Darwin, it usually prefers the larger definition, which is probably why the instrprof-override-filename.c test has been passing. The fix is to move the runtime's definition into a separate object file within the archive. This means that the linker won't "see" the runtime's definition unless the user program has not provided one. I couldn't think of a great way to test this other than to mimic the Darwin failure: use -fprofile-instr-generate=<some-small-path>. Testing: check-{clang,profile}, modified instrprof-override-filename.c. [1] [Profile] deprecate __llvm_profile_override_default_filename https://reviews.llvm.org/D22613 https://reviews.llvm.org/D22614 Differential Revision: https://reviews.llvm.org/D34797 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306710 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[scudo] Change aligned alloc functions to be more compliant & perf changesKostya Kortchinsky
Summary: We were not following the `man` documented behaviors for invalid arguments to `memalign` and associated functions. Using `CHECK` for those was a bit extreme, so we relax the behavior to return null pointers as expected when this happens. Adapt the associated test. I am using this change also to change a few more minor performance improvements: - mark as `UNLIKELY` a bunch of unlikely conditions; - the current `CHECK` in `__sanitizer::RoundUpTo` is redundant for us in *all* calls. So I am introducing our own version without said `CHECK`. - change our combined allocator `GetActuallyAllocatedSize`. We already know if the pointer is from the Primary or Secondary, so the `PointerIsMine` check is redundant as well, and costly for the 32-bit Primary. So we get the size by directly using the available Primary functions. Finally, change a `int` to `uptr` to avoid a warning/error when compiling on Android. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34782 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306698 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29Revert "[LSan] Make LSan allocator allocator_may_return_null compliant"Michael Zolotukhin
This reverts commit r306624. The committed test failed on various bots (e.g. on green dragon). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306644 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29Revert "[asan] Control location of symbolizer on device using ↵Vitaly Buka
ANDROID_SYMBOLIZER_PATH" Not needed, I am going to put symbolizer into tests dir. This reverts commit r306627. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306630 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[asan] Control location of symbolizer on device using ANDROID_SYMBOLIZER_PATHVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306627 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[LSan] Make LSan allocator allocator_may_return_null compliantAlex Shlyapnikov
Summary: LSan allocator used to always return nullptr on too big allocation requests (the definition of "too big" depends on platform and bitness), now it follows policy configured by allocator_may_return_null flag. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34786 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306624 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[asan] Fix try to fix test on AndroidVitaly Buka
%T is dir on host system, device does not have it git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[asan] Disable tests which do no work on AndroidVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306620 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29[asan] This test now passesVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306619 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[Sanitizers] Operator new() interceptors always die on allocation errorAlex Shlyapnikov
Summary: Operator new interceptors behavior is now controlled by their nothrow property as well as by allocator_may_return_null flag value: - allocator_may_return_null=* + new() - die on allocation error - allocator_may_return_null=0 + new(nothrow) - die on allocation error - allocator_may_return_null=1 + new(nothrow) - return null Ideally new() should throw std::bad_alloc exception, but that is not trivial to achieve, hence TODO. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34731 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306604 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28Revert r306504: Re-enable wait.cc, wait4.cc, waitid.cc tests on Darwin.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[XRay][compiler-rt][NFC] Move test case into correct directory.Dean Michael Berris
Followup to D34669. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306506 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[XRay][compiler-rt] Only run test in x86_64 linux.Dean Michael Berris
Followup to D34669. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306505 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28Re-enable wait.cc, wait4.cc, waitid.cc tests on Darwin. They used to be ↵Kuba Mracek
flaky, something to do with LeakSanitizer now being enabled on Darwin. Let's re-enable them and see if they are still flaky or not. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306504 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[XRay][compiler-rt][NFC] Add example always/never instrument files.Dean Michael Berris
Summary: This change introduces two files that show exaples of the always/never instrument files that can be provided to clang. We don't add these as defaults yet in clang, which we can do later on (in a separate change). We also add a test that makes sure that these apply in the compiler-rt project tests, and that changes in clang don't break the expectations in compiler-rt. Reviewers: pelikan, kpw Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34669 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306502 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Don't double-include cfi tests on linuxFrancis Ricci
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306455 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Loop directly over sanitizers to build in cmakeFrancis Ricci
Summary: Cleaner than computing the intersection for each possible sanitizer Reviewers: compnerd, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34693 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306453 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is usedFrancis Ricci
Summary: This allows check-all to be used when only a subset of the sanitizers are built. Reviewers: beanz, compnerd, rnk, pcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D34644 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306450 91177308-0d34-0410-b5e6-96231b3b80d8