summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/sanitizer_linux_test.cc
AgeCommit message (Collapse)Author
2017-07-22[sanitizer_common] Move filesystem-related code out of sanitizer_common.ccVitaly Buka
Summary: This is a pure refactoring change. It just moves code that is related to filesystem operations from sanitizer_common.{cc,h} to sanitizer_file.{cc,h}. This makes it cleaner to disable the filesystem-related code for a new port that doesn't want it. Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: vitalybuka, llvm-commits, kubamracek, mgorny, phosek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35591 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308819 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20Revert "[sanitizer_common] Move filesystem-related code out of ↵Vitaly Buka
sanitizer_common.cc" Breaks Windows build. This reverts commit r308640. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308648 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[sanitizer_common] Move filesystem-related code out of sanitizer_common.ccAlex Shlyapnikov
This is a pure refactoring change. It just moves code that is related to filesystem operations from sanitizer_common.{cc,h} to sanitizer_file.{cc,h}. This makes it cleaner to disable the filesystem-related code for a new port that doesn't want it. Commiting for mcgrathr. Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35591 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-15Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest ↵Zia Ansari
that caused them to fail sometimes and act flaky. Differential Revision: http://reviews.llvm.org/D17228 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27using /system/bin/sh on android in tests.Mike Aizatsky
Subscribers: tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D16654 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259001 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
2016-01-25Revert "[sanitizers] extracted process management functions"Mike Aizatsky
This reverts commit e5b34d5a2bf4c882bc647dd26a8cea2adc76f63c. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[sanitizers] extracted process management functionsMike Aizatsky
Differential Revision: http://reviews.llvm.org/D16542 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258710 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08[asan] Disable ThreadSelfTest on Android.Evgeniy Stepanov
Also #ifdef out the implementation of ThreadSelf() and ThreadSelfOffset() helper functions that are broken and unused on Android. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247053 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-19[LSan] [MIPS] adding support of LSan for mips64/mips64el archMohit K. Bhakkad
Patch by Sagar Thakur Reviewers: petarj, earthdok, kcc. Subscribers: samsonov, dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7013 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@229830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-31Revert "Remove unused function."Alexey Samsonov
This reverts commit r227633. SetEnv was prematurely deleted. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227665 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30Remove unused function.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227633 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11[sanitizer] Define kPthreadDestructorIterations on POSIX systems.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192453 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11[sanitizer] Ninja style fix to r192442.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11[sanitizer] Move the PTHREAD_DESTRUCTOR_ITERATIONS constant to ↵Sergey Matveev
sanitizer_linux.h. Add a test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192442 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-30Fix #if guards in sanitizer_common codeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182918 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29[sanitizer] Change the way GetThreadStackAndTls() obtains the thread ↵Sergey Matveev
descriptor address. Instead of using arch_prctl(ARCH_GET_FS), read the address from the tread descriptor itself. This lets us avoid sandboxing issues. Also, GetThreadStackAndTls() can now be implemented on i386. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15[asan] fix powerpc build and one test; fix lintKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181881 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14[sanitizer] LibraryNameIs in sanitizer_linuxSergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181787 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14[sanitizer] Minor fixes in sanitizer_common tests.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07[sanitizer] Move GetThreadStackAndTls from TSan to sanitizer_common.Sergey Matveev
Move this function to sanitizer_common because LSan uses it too. Also, fix a bug where the TLS range reported for main thread was off by the size of the thread descriptor from libc (TSan doesn't care much, but for LSan it's critical). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181322 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23Revert r180082 and add a test for SetEnv functionAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180098 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[Sanitizer] Fix compiler warnings and style issues in sanitizer_common ↵Alexey Samsonov
tests. Use -Werror=sign-compare when building them. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[libsanitizer] fixed a bug in ThreadLister tests where we forgot to ↵Alexander Potapenko
terminate one thread Patch by Sergey Matveev (earthdok@google.com) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177068 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[libsanitizer] Fixed incorrect handling of pre-existing threads in ↵Alexander Potapenko
ThreadLister test. Also, extended the test to check that ThreadLister::Reset() works as intended. Patch by Sergey Matveev (earthdok@google.com) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-28[Sanitizer] Relax ThreadLister tests to allow possible pre-existing threads. ↵Alexey Samsonov
Do proper mutex destruction. Patch by Sergey Matveev git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176249 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27add Linux syscall wrappers and ThreadLister to sanitizer_commonKostya Serebryany
ThreadLister is a Linux-specific class for obtaining the thread IDs of a process from procfs (/proc/<pid>/task/). It will be used by leak checking code. Also add several syscall wrappers which will be required by the same code that uses ThreadLister, but are not used in ThreadLister itself. Patch by Sergey Matveev git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176179 91177308-0d34-0410-b5e6-96231b3b80d8