summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/lsan
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't use abort_on_error for lsan darwin test suiteFrancis Ricci2017-04-181-0/+7
| | | | | | | | | | | | | | | Summary: This option is disabled by our other test suites, and will cause failures when unit tests abort instead of failing with an error code. Will also prevent the test suite from being too slow. Reviewers: kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32129 llvm-svn: 300593
* Allow for setting of global platform-specific lsan options in the test suiteFrancis Ricci2017-04-1833-70/+78
| | | | | | | | | | Reviewers: kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32131 llvm-svn: 300592
* Move Linux-specific lsan tests into a new directoryFrancis Ricci2017-04-1310-0/+9
| | | | | | | | | | | | | | Summary: These tests aren't supported on other platforms, move them to their own directory. Reviewers: kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32034 llvm-svn: 300247
* Revert "Enable LSan on PowerPC64."Alex Shlyapnikov2017-04-131-3/+2
| | | | | | This reverts commit r300204. Breaks ASAN tests on PPC. llvm-svn: 300237
* Enable LSan on PowerPC64.Alex Shlyapnikov2017-04-131-2/+3
| | | | | | | | | | | | | | Summary: With D31555 commited, looks like basic LSan functionality works on PPC64. Time to enable LSan there. Reviewers: eugenis Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D31995 llvm-svn: 300204
* [lsan] Reenable lsan tests on ARM botsMaxim Ostapenko2017-04-131-3/+2
| | | | | | | | | | | | | | | | | | This patch addresses pr32636. Enable lsan tests on ARM bots filtering out Thumb targets. Tested locally on ARM Arndale board in two configurations: 1) CFLAGS="-march=armv7-a" Testing Time: 37.57s Expected Passes : 69 Unsupported Tests : 7 2) CFLAGS="-march=armv7-a -mthumb" Testing Time: 0.16s Unsupported Tests : 76 Differential Revision: https://reviews.llvm.org/D32007 llvm-svn: 300194
* [LSAN] Disable on ARM/Thumb for goodRenato Golin2017-04-121-1/+2
| | | | | | | | I didn't pay enough attention to the patch I reverted, now I'm going to hit it with a bigger hammer until we can understand what the problems are. llvm-svn: 300044
* Revert "[lsan] Fix typo in test/lsan/lit.common.cfg"Renato Golin2017-04-121-1/+1
| | | | | | | | This reverts commit r299957. It broke the Thumb bots. We need to make sure why and maybe stop it from being tested on Thumb environments. But for now, let's get the bots green. llvm-svn: 300042
* [lsan] Fix typo in test/lsan/lit.common.cfgMaxim Ostapenko2017-04-111-1/+1
| | | | llvm-svn: 299957
* Reapply "Enable LSan for arm Linux"Maxim Ostapenko2017-04-115-7/+19
| | | | | | This patch reapplies r299923 with typo fixed in BLX macros. llvm-svn: 299948
* Revert r299923, it doesn't build in bootstrap builds.Nico Weber2017-04-115-18/+6
| | | | | | | | | | | | | | | FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_linux.cc.o lib/sanitizer_common/sanitizer_linux.cc:1340:24: error: invalid instruction BLX(ip) ^ lib/sanitizer_common/sanitizer_linux.cc:1313:19: note: expanded from macro 'BLX' # define BLX(R) "mov lr, pc; bx" #R "\n" ^ <inline asm>:6:13: note: instantiated into assembly here mov lr, pc; bxip ^~~~ llvm-svn: 299943
* [lsan] Enable LSan for arm LinuxMaxim Ostapenko2017-04-115-6/+18
| | | | | | | | This patch enables LSan for arm Linux. Differential Revision: https://reviews.llvm.org/D29586 llvm-svn: 299923
* Disable use_tls_dynamic on 32-bit linuxFrancis Ricci2017-03-271-0/+1
| | | | | | | | | | | | | | | Summary: This test fails with a false negative due to an unrelated change. Since we expect a number of false negatives on 32-bit lsan, disable this test on linux-i386 and linux-i686. Reviewers: kubamracek, m.ostapenko, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31300 llvm-svn: 298847
* [test] Enable the strace_test only if strace is installedMichal Gorny2017-02-082-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D29628 llvm-svn: 294425
* [lsan] Fix typo in stale_stack_leak.cc testcaseMaxim Ostapenko2017-01-311-1/+1
| | | | llvm-svn: 293644
* [lsan] Disable stale_stack_leak.cc testcase on x86Maxim Ostapenko2017-01-311-0/+3
| | | | llvm-svn: 293621
* [lsan] Renable LSan for x86 LinuxMaxim Ostapenko2017-01-3125-25/+29
| | | | | | | | | The missed clang part was committed at https://reviews.llvm.org/rL293609 thus we can reenable LSan for x86 Linux. Differential Revision: https://reviews.llvm.org/D28609 llvm-svn: 293610
* Revert "[lsan] Enable LSan for x86 Linux."Evgeniy Stepanov2017-01-2325-29/+25
| | | | | | | Breaks tests on i686/Linux due to missing clang driver support: error: unsupported option '-fsanitize=leak' for target 'i386-unknown-linux-gnu' llvm-svn: 292844
* [lsan] Enable LSan for x86 Linux.Maxim Ostapenko2017-01-2325-25/+29
| | | | | | | | | | | | | People keep asking LSan to be available on 32 bit targets (e.g. https://github.com/google/sanitizers/issues/403) despite the fact that false negative ratio might be huge (up to 85%). This happens for big real world applications that may contain random binary data (e.g. browser), but for smaller apps situation is not so terrible and LSan still might be useful. This patch adds initial support for x86 Linux (disabled by default), ARM32 is in TODO list. We used this patch (well, ported to GCC) on our 32 bit mobile emulators and it worked pretty fine thus I'm posting it here to initiate further discussion. Differential Revision: https://reviews.llvm.org/D28609 llvm-svn: 292775
* [sanitizer] Add macOS minimum deployment target to all compiler invocations ↵Kuba Mracek2016-11-291-10/+1
| | | | | | | | | | in lit tests The Clang driver on macOS decides the deployment target based on various things, like your host OS version, the SDK version and some environment variables, which makes lit tests pass or fail based on your environment. Let's make sure we run all lit tests with `-mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}` (10.9 unless overriden). Differential Revision: https://reviews.llvm.org/D26929 llvm-svn: 288186
* [lsan] [aarch64] Fix printing of pointers in make check tests - updateStrahinja Petrovic2016-11-1417-18/+19
| | | | | | | | | This patch replaces fprintf with print_address function in LSAN tests. This is necessary because of different printing of pointers in fprintf and sanitizer's print function. Differential Revision: https://reviews.llvm.org/D26084. llvm-svn: 286816
* [lsan] [aarch64] Fix printing of pointers in make check testsStrahinja Petrovic2016-10-2016-36/+52
| | | | | | | | | This patch replaces fprintf with print_address function in LSAN tests. This is necessary because of different printing of pointers in fprintf and sanitizer's print function. Differential Revision: https://reviews.llvm.org/D25270. llvm-svn: 284722
* Make lsan complain loudly when running under ptraceKostya Serebryany2016-10-131-0/+14
| | | | | | | | | | | | | | | | | | Summary: LeakSanitizer does not work with ptrace but currently it will print warnings (only under verbosity=1) and then proceed to print tons of false reports. This patch makes lsan fail hard under ptrace with a verbose message. https://github.com/google/sanitizers/issues/728 Reviewers: eugenis, vitalybuka, aizatsky Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D25538 llvm-svn: 284171
* [lsan] one more test fix to please the Debian Sid bot (this time, confirmed ↵Kostya Serebryany2016-08-251-3/+3
| | | | | | on the proper machine). Apparently, newer glibc uses slightly more stack llvm-svn: 279768
* [lsan] give a test a bit more stack -- it started failing after r279664 on ↵Kostya Serebryany2016-08-241-2/+3
| | | | | | the debian bot, hopefully this is a fix. llvm-svn: 279674
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 llvm-svn: 275111
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-161-2/+1
| | | | | | | | | | | | At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. llvm-svn: 266520
* [LSan] Enable use_registers test for MIPSMohit K. Bhakkad2016-03-031-0/+5
| | | | | | | | | | Reviewers: samsonov Subscribers: jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D17797 llvm-svn: 262581
* [tests] Always specify correct config.target_arch when configuring test suite.Alexey Samsonov2016-02-232-3/+5
| | | | llvm-svn: 261601
* [LSan] Test case fix: mode debug output, synchronization instead of sleep().Alexey Samsonov2016-02-111-2/+11
| | | | llvm-svn: 260564
* [LSan] Fix a crash when LSan hits a guard page while scanning thread stack ↵Alexey Samsonov2016-02-111-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | for pointers. Summary: In some cases stack pointer register (SP) doesn't point into the thread stack: e.g. if one is using swapcontext(). In this case LSan conservatively tries to scan the whole thread stack for pointers. However, thread stack (at least in glibc implementation) may also include guard pages, causing LSan to crash when it's reading from them. One of the solutions is to use a pthread_attr_getguardsize() to adjust the calculated stack boundaries. However, here we're just using IsAccessibleMemoryRange to skip guard pages and make the code (slightly) less platform-specific. Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17116 llvm-svn: 260554
* [lsan] Run the tests for each supported arch and suffix each one to ↵Daniel Sanders2016-02-093-11/+43
| | | | | | | | | | | | | | | | | | | | | | | distinguish them. Summary: Previously, the tests only ran for the 64-bit equivalent of the default target (see -m64). Given the supported architecture list only contains 64-bit targets, this happens to work out the same as the supported targets in most cases but may matter for X86_64/X86_64h on Darwin. For other targets, the practical effect is that the test names contain the architecture. This resolves some confusion when lsan tests fail since their name no longer implies that they are trying to test the default target. Reviewers: samsonov Subscribers: tberghammer, danalbert, llvm-commits, srhines Differential Revision: http://reviews.llvm.org/D16859 llvm-svn: 260232
* [LSan] Ignore all allocations made inside pthread_create.Alexey Samsonov2016-01-162-2/+3
| | | | | | | | | | | | | Thread stack/TLS may be stored by libpthread for future reuse after thread destruction, and the linked list it's stored in doesn't even hold valid pointers to the objects, the latter are calculated by obscure pointer arithmetic. With this change applied, LSan test suite passes with "use_ld_allocations" flag defaulted to "false". It still requires more testing to check if the default can be switched. llvm-svn: 257975
* [LSan] Add "use_ld_allocations" flag to disable old way of DTLS handling.Alexey Samsonov2016-01-141-1/+1
| | | | | | | | | | | This flag allows to disable old way of determining dynamic TLS by filtering out allocations from dynamic linker. This will be eventually superseded by __tls_get_addr interceptor (see r257785), after we: 1) Test it in several supported environments 2) Deal with existing problems (currently we can't find a pointer to DTV which is calloc()-ed in pthread_create). llvm-svn: 257789
* [LSan] Fix tests with some libstdc++ implementations.Alexey Samsonov2015-11-195-9/+36
| | | | | | | | | | | | | | | | | | | Summary: Newer libstdc++ has global pool, which is filled with objects allocated during libstdc++ initialization, and never released. Using use_globals=0 in the lit tests results in these objects being treated as leaks. Fix this by porting several tests to plain C, and introducing a simple sanity test case for __lsan::ScopedDisabler. Reviewers: kcc, ygribov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14798 llvm-svn: 253576
* [Sanitizer] Teach ReadFileToBuffer to distinguish empty file from ↵Alexey Samsonov2015-07-171-0/+6
| | | | | | | | | | | | | | | | inaccessible file. Summary: This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=399 (sanitizers crash with empty suppression files). Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11284 llvm-svn: 242594
* Revert "Revert "[CMake] LSan is not actually available on Darwin.""Alexey Samsonov2015-06-191-10/+8
| | | | | | Re-land fixed version of r239955. llvm-svn: 240108
* Revert "[CMake] LSan is not actually available on Darwin."Justin Bogner2015-06-181-8/+10
| | | | | | | | | This change makes cmake fail to even run on Darwin with errors evaluating "$<TARGET_OBJECTS:RTInterception.x86_64>". This reverts r239955 llvm-svn: 239985
* [CMake] LSan is not actually available on Darwin.Alexey Samsonov2015-06-171-10/+8
| | | | llvm-svn: 239955
* [lsan] Add an interface function for on-demand leak checking.Sergey Matveev2015-04-241-0/+32
| | | | | | | | | | | | | | | | | | | | | | Summary: Add an interface function which can be used to periodically trigger leak detection in a long-running process. NB: The meaning of the kIgnored tag has been changed to allow easy clean-up between subsequent leak checks. Previously, this tag was applied to explicitly ignored (i.e. with __lsan_disable() or __lsan_ignore_object()) chunks *and* any chunks only reachable from those. With this change, it's only applied to explicitly ignored chunks. Reviewers: samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9159 llvm-svn: 235728
* [LSan][MIPS64] Enable LSan testing for mips64/mips64elMohit K. Bhakkad2015-02-191-2/+2
| | | | | | | | | | | | Patch by Sagar Thakur Reviewers: petarj, earthdok, kcc. Subscribers: samsonov, dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7124 llvm-svn: 229833
* [sanitizer] Flag parser rewrite.Evgeniy Stepanov2015-01-152-5/+2
| | | | | | | The new parser is a lot stricter about syntax, reports unrecognized flags, and will make it easier to implemented some of the planned features. llvm-svn: 226169
* [lsan] Fix a typo in a test.Evgeniy Stepanov2015-01-151-1/+1
| | | | llvm-svn: 226168
* [lsan] Add debug output to leak_check_before_thread_started.cc.Sergey Matveev2014-12-191-2/+1
| | | | | | Trying to investigate why this test is flaky. llvm-svn: 224580
* Fix suppressions file usageFilipe Cabecinhas2014-12-181-4/+4
| | | | | | | | | | | | | | | | | | Summary: Always quote suppressions files given to *_OPTIONS. This will make it not break when given full Windows paths (otherwise, parsing would stop after the drive's letter + ':'). Also fix one or two cases where the suppression files' extensions were not *.supp. Reviewers: samsonov, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6680 llvm-svn: 224529
* [LSan] Rewrite the test from r223419 to not use C++11.Sergey Matveev2014-12-051-6/+23
| | | | | | | | This was causing build failures on llvm-clang-lld-x86_64-centos-6.5 for some reason. Anyway, the new way is better because we no longer rely on std::thread implementation details. llvm-svn: 223480
* [ASan, LSan] Improve tracking of thread creation.Sergey Matveev2014-12-051-0/+15
| | | | | | | | | | | | | | | In the current scheme of things, the call to ThreadStart() in the child thread is not synchronized with the parent thread. So, if a pointer is passed to pthread_create, there may be a window of time during which this pointer will not be discoverable by LSan. I.e. the pthread_create interceptor has already returneed and thus the pointer is no longer on the parent stack, but we don't yet know the location of the child stack. This has caused bogus leak reports (see http://llvm.org/bugs/show_bug.cgi?id=21621/). This patch makes the pthread_create interceptor wait until the child thread is properly registered before returning. llvm-svn: 223419
* [asan] Fix stale_stack_leak.cc test in ASan-UAR mode.Evgeniy Stepanov2014-12-031-0/+1
| | | | | | | This test does an intentional use-after-return, but this is not the focus of the test, so ignore it. llvm-svn: 223230
* [ASan] Fix leak tests on 64-bit targets other than x86-64 (take two)Jay Foad2014-11-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: First, remove lit configuration that sets ASAN_OPTIONS to detect_leaks=1 because this is already the default when leak detection is supported. This removes a bit of duplication between various lit.cfg files. Second, add a new feature 'leak-detection' if we're targetting x86_64 (not i386) on Linux. Third, change a couple of tests that need leak detection to require the new 'leak-detection' feature. Reviewers: kcc, earthdok, samsonov Reviewed By: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6396 llvm-svn: 222738
* Use "-gline-tables-only" instead of "-g" in sanitizer test suites.Alexey Samsonov2014-09-051-1/+1
| | | | | | | We are interested in verifying that -gline-tables-only provides enough debug information for verbose error reports and symbolized stack traces. llvm-svn: 217284
OpenPOWER on IntegriCloud