summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
* [asan] Fix Win64 test portability issuesReid Kleckner2016-07-214-5/+6
| | | | | | | | | | | | | The OOM test should really only run on 32-bits, since it's hard to OOM on x64. The operator_array_new_with_dtor_left_oob tests need to account for the larger array cookie on x64 (8 bytes instead of 4). Use -std=c++14 in use-after-scope-capture.cc to avoid errors in the MSVC 2015 STL on Windows. The default there is C++14 anyway. llvm-svn: 276332
* Fix unsymbolize unittest. Adding win64 address.Etienne Bergeron2016-07-211-2/+2
| | | | llvm-svn: 276326
* [compiler-rt] Fix interception of memcpy/memmove on win64Etienne Bergeron2016-07-211-2/+2
| | | | | | | | | | | | | | Summary: This patch is fixing running interception unittests for memcpy/memmove on windows 64. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22641 llvm-svn: 276324
* [compiler-rt] Disable some unittests on windows that rely on shell commandEtienne Bergeron2016-07-214-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These unittests are not running on windows because they are using incorrect commands. They were not failing on 32-bits because there is a requirement: asan-64-bits. ``` $ "nm" "C:\src\llvm\ninja64\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\no_asan_gen_globals.c.tmp.exe" # command stderr: 'nm': command not found error: command failed with exit status: 127 ``` ``` $ "rm" "-rf" "C:\src\llvm\ninja64\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output/coverage-tracing" $ "mkdir" "C:\src\llvm\ninja64\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output/coverage-tracing" $ "A=x" # command stderr: 'A=x': command not found error: command failed with exit status: 127 ``` ``` $ "DIR=C:\src\llvm\ninja64\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output/coverage-order-pcs" # command stderr: 'DIR=C:\\src\\llvm\\ninja64\\projects\\compiler-rt\\test\\asan\\X86_64WindowsConfig\\TestCases\\Output/coverage-order-pcs': command not found error: command failed with exit status: 127 ``` Reviewers: rnk Subscribers: tberghammer, llvm-commits, danalbert, wang0109, srhines, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22612 llvm-svn: 276290
* [compiler-rt] Fix broken unittest on win64Etienne Bergeron2016-07-212-5/+17
| | | | | | | | | | | | | | | | | | | Summary: This is an other tentative to fix: https://reviews.llvm.org/D22588 It's less clever, but should work. Turn out there is not an easy way to write a portable print for a pointer in lowercase without the prefix 0x. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22606 llvm-svn: 276286
* [Profile] Add new test to cover %m specifier with shared library (instrumented)Xinliang David Li2016-07-211-0/+16
| | | | llvm-svn: 276229
* [compiler-rt] Fix broken SymInitialize unittestEtienne Bergeron2016-07-211-2/+2
| | | | | | | | | | | | | | | | Summary: By adding the initialisation of the symbolisation library (DbgHelp) we are swapping the order in which both warnings are produced. We can't use CHECK-NEXT as the dbghelp warning is multiline. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22586 llvm-svn: 276228
* [Profile] More test clean up to read profile from directory specified by ↵Xinliang David Li2016-07-212-4/+6
| | | | | | -fprofile-generate= llvm-svn: 276226
* [Profile] Cleanup test to use new dir input featureXinliang David Li2016-07-211-8/+7
| | | | llvm-svn: 276225
* revert rL276179: [compiler-rt] Fix broken unittest related to 64-bit print ↵Etienne Bergeron2016-07-202-6/+5
| | | | | | format llvm-svn: 276187
* [compiler-rt] Fix broken unittest related to 64-bit print formatEtienne Bergeron2016-07-202-5/+6
| | | | | | | | | | | | | | | Summary: The printf is not working correctly on 64-bit MSVC. The portable way to print "size_t" is to use "%zx" (size_t in hexa). Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22588 llvm-svn: 276179
* fix flaky test on windows sanitizer botsEtienne Bergeron2016-07-201-8/+8
| | | | llvm-svn: 276143
* [asan] trying to fix the android botKostya Serebryany2016-07-201-1/+0
| | | | llvm-svn: 276134
* Try to deflake Windows/dll_host.cc test by not using repeated echo appendingReid Kleckner2016-07-201-10/+12
| | | | llvm-svn: 276130
* [compiler-rt/asan] Disable irrelevant unittest on win64Etienne Bergeron2016-07-201-0/+1
| | | | | | | | | | | | | | Summary: This test is allocating a 1gig chunk to make shadow allocation failed, but on 64-bits architecture the test is working. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22553 llvm-svn: 276122
* [Profile] implement interface to get profile path prefixXinliang David Li2016-07-201-0/+39
| | | | | | Differential Revision: http://reviews.llvm.org/D22546 llvm-svn: 276083
* [Profile] Test cleanup -- use new lit var for IR PGO tests /NFCXinliang David Li2016-07-194-17/+17
| | | | llvm-svn: 276036
* [Profile] Introduce lit test vars for IR based instrumentationXinliang David Li2016-07-191-2/+10
| | | | llvm-svn: 276034
* [asan] trying to fix the android botKostya Serebryany2016-07-191-5/+9
| | | | llvm-svn: 276031
* Add detect_stack_use_after_scope runtime flagVitaly Buka2016-07-191-3/+6
| | | | | | | | | | Summary: This flag could be used to disable check in runtime. Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D22495 llvm-svn: 276004
* [compiler-rt] Fix Asan imports/exports unittestEtienne Bergeron2016-07-191-5/+24
| | | | | | | | | | | | | | | | | | | Summary: Avoid mismatch between imports/exports for 32-bit and 64-bits version. The test is running grep over macros to detect which functions are intercepted. Unfortunately, exception handlers differ in 32-bit and 64-bit. This patch is removing the exception handlers from the test. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22484 llvm-svn: 275982
* [esan|wset] Fix flaky sampling testsDerek Bruening2016-07-192-18/+19
| | | | | | | Adds a new esan public interface routine __esan_get_sample_count() and uses it to ensure that tests of sampling receive the minimum number of samples. llvm-svn: 275948
* [asan] trying to fix the windows build Kostya Serebryany2016-07-151-0/+0
| | | | llvm-svn: 275644
* [sanitizers] add interceptor for memmem; add weak hooks for strncasecmp, ↵Kostya Serebryany2016-07-152-0/+103
| | | | | | strcasecmp, strstr, strcasestr, memmem llvm-svn: 275621
* [asan] Reduce flakiness of halt_on_error-torture.cc testcase.Maxim Ostapenko2016-07-151-6/+2
| | | | | | | | | It seems in some situations we have clashes on very first error so test only prints "nested bug in the same thread, aborting" rather than "use-after-poison", so remove corresponding " RUN: FileCheck %s < 10.txt" line. Also, the two last " RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 1.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 1.txt" look wrong, they should check 10.txt. Fix these lines too. Differential Revision: https://reviews.llvm.org/D22309 llvm-svn: 275539
* [compiler-rt] Fix missing argument in asan unittestEtienne Bergeron2016-07-141-2/+2
| | | | | | | | | | | | | | | | Summary: Both test have the same command-line. The second test is missing the /GS-. Keep in mind that /GS is on by default. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22339 llvm-svn: 275491
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-141-0/+19
| | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX and built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Previously reverted, up for review again to iron out outstanding issues. Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D22181 llvm-svn: 275484
* Replace -mllvm -asan-use-after-scope=1 with -fsanitize-address-use-after-scopeVitaly Buka2016-07-1411-11/+11
| | | | | | | | | | | | | | Summary: When test was added we had no -fsanitize-address-use-after-scope in clang so we had to use -mllvm -asan-use-after-scope=1. Reviewers: eugenis Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D22382 llvm-svn: 275475
* Disable the "gcd-io-race.mm" test to investigate bot hangs due to the test ↵Kuba Brecka2016-07-121-0/+2
| | | | | | being deadlocked. llvm-svn: 275182
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-1112-13/+14
| | | | | | | | | | | | | | | | | | | | 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
* [tsan] Add support for GCD IO channels on DarwinKuba Brecka2016-07-116-0/+390
| | | | | | | | This patch adds interceptors for dispatch_io_*, dispatch_read and dispatch_write functions. This avoids false positives when using GCD IO. Adding several test cases. Differential Revision: http://reviews.llvm.org/D21889 llvm-svn: 275071
* test: Use %clangxx in objc++ test filesSaleem Abdulrasool2016-07-098-9/+9
| | | | | | | | | | These test in this change are objc++, but are built using %clang, not %clangxx. The reason this works is the driver has been adding -lc++ for sanitizer enabled builds. By making these tests use %clangxx, they no longer depend on the driver linking to c++. Doing so will allow us to prevent overlinking of libc++ for applications. llvm-svn: 274989
* [esan] Add __esan_report for mid-run dataDerek Bruening2016-07-092-0/+73
| | | | | | | | | | | | | | | | | | | | | Summary: Adds a new public interface routine __esan_report() which can be used to request profiling results prior to abnormal termination (e.g., for a server process killed by its parent where the normal exit does not allow for normal result reporting). Implements this for the working-set tool. The cache frag tool is left unimplemented as it requires missing iteration capabilities. Adds a new test. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D22098 llvm-svn: 274964
* Revert "Add runtime support for __cpu_model (__builtin_cpu_supports)"Alina Sbirlea2016-07-081-19/+0
| | | | | | This reverts commit r274873 until additional fixes are resolved. llvm-svn: 274944
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-081-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential revision: http://reviews.llvm.org/D21033 llvm-svn: 274873
* Revert r274865-r274870Alina Sbirlea2016-07-081-19/+0
| | | | llvm-svn: 274872
* Add default initialization. Add unit test.Alina Sbirlea2016-07-081-0/+19
| | | | llvm-svn: 274867
* [tsan] Avoid false positives with GCD data callbacksKuba Brecka2016-07-071-0/+36
| | | | | | | | This patch adds synchronization between the creation of the GCD data object and destructor’s execution. It’s far from perfect, because ideally we’d want to synchronize the destruction of the last reference (via dispatch_release) and the destructor’s execution, but intercepting objc_release is problematic. Differential Revision: http://reviews.llvm.org/D21990 llvm-svn: 274749
* [esan|cfrag] Handle binaries built with -esan-aux-field-info=falseQin Zhao2016-07-071-13/+13
| | | | | | | | | | | | | | | | Summary: Handles binaries built with -esan-aux-field-info=false and print less information. Updates test struct-simple.cpp. Reviewers: aizatsky Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, kubabrecka, vitalybuka Differential Revision: http://reviews.llvm.org/D22020 llvm-svn: 274727
* [esan|wset] Ensure SIGSEGV is not blockedDerek Bruening2016-07-061-4/+19
| | | | | | | | | | | | | | | | | | | | Summary: Adds interception of sigprocmask and pthread_sigmask to esan so that the working set tool can prevent SIGSEGV from being blocked. A blocked SIGSEGV results in crashes due to our lazy shadow page allocation scheme. Adds new sanitizer helper functions internal_sigemptyset and internal_sigismember. Adds a test to workingset-signal-posix.cpp. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D22063 llvm-svn: 274672
* [esan|wset] Further reduce flakiness of sampling testDerek Bruening2016-07-061-3/+7
| | | | | | | Enhances the sampling test to try and reduce flakiness further by increasing the workload to ensure a few samples are gathered. llvm-svn: 274669
* [tsan] Fix false positives with GCD dispatch_source_*Kuba Brecka2016-07-061-0/+33
| | | | | | | | We already have interceptors for dispatch_source API (e.g. dispatch_source_set_event_handler), but they currently only handle submission synchronization. We also need to synchronize based on the target queue (serial, concurrent), in other words, we need to use dispatch_callback_wrap. This patch implements that. Differential Revision: http://reviews.llvm.org/D21999 llvm-svn: 274619
* Attempt to reduce flakiness in workingset-samples.cppDavid Majnemer2016-07-061-5/+5
| | | | | | | The test is matching against 'KB' but it looks like the output can be 'MB'. llvm-svn: 274587
* [asan] Update tests according to r274578Ryan Govostes2016-07-052-2/+2
| | | | llvm-svn: 274579
* [tsan] Synchronize leaving a GCD group with notificationsKuba Brecka2016-07-051-0/+56
| | | | | | | | In the patch that introduced support for GCD barrier blocks, I removed releasing a group when leaving it (in dispatch_group_leave). However, this is necessary to synchronize leaving a group and a notification callback (dispatch_group_notify). Adding this back, simplifying dispatch_group_notify_f and adding a test case. Differential Revision: http://reviews.llvm.org/D21927 llvm-svn: 274549
* [tsan] dispatch_once interceptor will cause a crash/deadlock when the ↵Kuba Brecka2016-07-051-0/+41
| | | | | | | | | | original dispatch_once is used Because we use SCOPED_TSAN_INTERCEPTOR in the dispatch_once interceptor, the original dispatch_once can also be sometimes called (when ignores are enabled or when thr->is_inited is false). However the original dispatch_once function doesn’t expect to find “2” in the storage and it will spin forever (but we use “2” to indicate that the initialization is already done, so no waiting is necessary). This patch makes sure we never call the original dispatch_once. Differential Revision: http://reviews.llvm.org/D21976 llvm-svn: 274548
* [esan|cfrag] Add struct array access reportQin Zhao2016-07-021-16/+31
| | | | | | | | | | | | | | | Summary: Adds struct array access counter report. Updates test struct-simple.cpp. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D21595 llvm-svn: 274421
* [tsan] Relax the "ignored-interceptors.mm" testcase. The test has been ↵Kuba Brecka2016-07-011-1/+1
| | | | | | flaky because it's detecting a false positive race (coming from a system library) and sometimes that race is detected after we're printing "Done". llvm-svn: 274346
* [compiler-rt] Fix broken unittest using alloca on MSVC.Etienne Bergeron2016-06-301-1/+8
| | | | | | | | | | | | | | | | | Summary: The alloca header is not present on windows. This test was committed recently: http://reviews.llvm.org/D21509 http://reviews.llvm.org/rL273889 Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha, kubabrecka Differential Revision: http://reviews.llvm.org/D21864 llvm-svn: 274230
* [tsan] Stop extending the block’s lifetime in dispatch_group_asyncKuba Brecka2016-06-291-0/+43
| | | | | | | | The dispatch_group_async interceptor actually extends the lifetime of the executed block. This means the destructor of the block (and captured variables) is called *after* dispatch_group_leave, which changes the semantics of dispatch_group_async. This patch fixes that. Differential Revision: http://reviews.llvm.org/D21816 llvm-svn: 274117
OpenPOWER on IntegriCloud