summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases/Posix
Commit message (Collapse)AuthorAgeFilesLines
* Add a missing include in test.Evgeniy Stepanov2019-10-101-0/+1
| | | | | | A fix for r373993. llvm-svn: 374448
* [Sanitizers] Fix getrandom testDavid Carlier2019-10-101-1/+1
| | | | llvm-svn: 374333
* [Sanitizers] Porting getrandom/getentropy interceptors to FreeBSDDavid Carlier2019-10-101-0/+26
| | | | | | | | | | | | | - Available from 12.x branch, by the time it lands next year in FreeBSD tree, the 11.x's might be EOL. - Intentionally changed the getrandom test to C code as with 12.0 (might be fixed in CURRENT since), there is a linkage issue in C++ context. Reviewers: emaste, dim, vitalybuka Reviewed-By: vitalybuka Differential Revision: https://reviews.llvm.org/D68451 llvm-svn: 374315
* [sanitizer] Fix crypt.cpp on Android againVitaly Buka2019-10-081-3/+3
| | | | llvm-svn: 374125
* [sanitizer] Fix crypt.cpp test on DarwinVitaly Buka2019-10-081-1/+1
| | | | llvm-svn: 374115
* [sanitizer] Disable crypt*.cpp tests on AndroidVitaly Buka2019-10-081-0/+3
| | | | llvm-svn: 374088
* [msan] Add interceptors: crypt, crypt_r.Evgeniy Stepanov2019-10-081-0/+26
| | | | | | | | | | | | Reviewers: vitalybuka Subscribers: srhines, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68431 llvm-svn: 373993
* [UBSan] Follow up fix for r371442.Max Moroz2019-09-091-1/+1
| | | | | | | | | | | | | | Reviewers: vitalybuka, hctim, Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D67371 llvm-svn: 371453
* [Sanitizer] arc4random interception on MacDavid Carlier2019-08-191-1/+1
| | | | | | | | | | Reviewers: yln,vitalybuka Reviewed By: yln Differential Revision: https://reviews.llvm.org/D66391 llvm-svn: 369285
* Follow-up for r367863 and r367656Nico Weber2019-08-051-1/+1
| | | | llvm-svn: 367888
* compiler-rt: Rename cc files below test/sanitizer_common to cppNico Weber2019-08-0541-1/+1
| | | | | | See r367803 and similar other changes. llvm-svn: 367863
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-271-0/+0
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591
* [sanitizer] Enabled getpw_getgr.cc on iOSVitaly Buka2019-06-251-1/+0
| | | | | | | | | | | | | | Reviewers: kubamracek, delcypher, yln Reviewed By: delcypher Subscribers: yln, delcypher, llvm-commits, kubamracek, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D57786 llvm-svn: 364261
* [Sanitizer] Add interceptor for wcsdupPavel Labath2019-05-221-0/+15
| | | | | | | | | | | | | | Summary: The wide-string equivalent of strdup. Implementation trivial. Reviewers: vitalybuka, eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D62189 llvm-svn: 361357
* [compiler-rt][builtins][sanitizers] Update compiler-rt test cases forAmy Kwan2019-04-301-6/+8
| | | | | | | | | | | | | | | | compatibility with system's toolchain This patch aims to: - Guard ompiler-rt/test/builtins/Unit/compiler_rt_logb_test.c with macros, so the test runs on GLIBC versions >= 2.23. This is because the test relies on comparing its computed values to libm. Oolder versions might not compute to the same value as the compiler-rt value. - Update compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc so that std::string is not used, since false positives may be detected. Differential Revision: https://reviews.llvm.org/D60644 llvm-svn: 359606
* Reland "[compiler-rt] Intercept the bcmp() function."Clement Courbet2019-03-011-1/+10
| | | | | | | Fix test issues on darwin: The REQUIRES for the test should be the same as the guard for whether we intercept bcmp. llvm-svn: 355204
* Revert "[compiler-rt] Intercept the bcmp() function."Vlad Tsyrklevich2019-02-261-11/+1
| | | | | | | This reverts commits r354851, 354852, 354853 and r354888. They were causing build failures on the android sanitizer bot. llvm-svn: 354906
* [compiler-rt] Intercept the bcmp() function.Clement Courbet2019-02-261-1/+11
| | | | | | | | | | | | | | | | | | | | | Summary: I have not introduced a separate hook for `bcmp()` as I don't think there should be any reason for a sanitizer to treat it differently from `memcmp()`. This is only enabled when building on POSIX with GNU extensions. Context: this is to avoid losing coverage when emitting `bcmp() == 0` instead of `memcmp() == 0` in llvm, see https://reviews.llvm.org/D56593. Reviewers: mgorny, krytarowski, vitalybuka, dvyukov Subscribers: kubamracek, dberris, delcypher, jdoerfert, #sanitizers, llvm-commits, jyknight Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58379 llvm-svn: 354851
* [NFC][Sanitizer] Re-enable test on DarwinJulian Lettner2019-02-221-3/+0
| | | | | | | This unexpectedly passes on our CI, although it still fails on my machine. llvm-svn: 354701
* [Sanitizer] Fix uses of stack->Unwind(..., fast)Julian Lettner2019-02-221-2/+2
| | | | | | | | | | | Apply StackTrace::WillUseFastUnwind(fast) in a few more places missed by my previous patch (https://reviews.llvm.org/D58156). Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58550 llvm-svn: 354695
* [LSan] Fix `__sanitizer_print_stack_trace` via fast unwinderJulian Lettner2019-02-201-1/+1
| | | | | | | | | | Summary: Quick follow-up to: https://reviews.llvm.org/D58156 Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58358 llvm-svn: 354522
* [LSan][Darwin][NFC] Add comment explaining test failureJulian Lettner2019-02-181-1/+1
| | | | llvm-svn: 354290
* Revert "Temporarily disable calls to getgrnam/getgrnam_r in test due to it ↵Douglas Yung2019-02-141-4/+2
| | | | | | | | | | hitting unrelated issues in EGLIBC 2.19." This reverts commit r353594. We have updated our internal build bot to a newer version of LIBC which does not have this problem. llvm-svn: 354014
* Temporarily disable calls to getgrnam/getgrnam_r in test due to it hitting ↵Douglas Yung2019-02-091-2/+4
| | | | | | unrelated issues in EGLIBC 2.19. llvm-svn: 353594
* [sanitizer] Fix Android testsVitaly Buka2019-02-071-0/+2
| | | | | | On Android some fields can be null llvm-svn: 353377
* [sanitizer] Re-enabled getpw_getgr.cc on AndroidVitaly Buka2019-02-071-1/+1
| | | | | | | | | | | | Reviewers: eugenis Subscribers: srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D57785 llvm-svn: 353366
* [sanitizer] Don't unpoison buffer in getpw/getgr functionsVitaly Buka2019-02-071-0/+112
| | | | | | | | | | | | | | | | | Summary: Buffer should be referenced by results so used parts will be unpoisoned with unpoison_group and unpoison_passwd. This fixes TSAN performance issue made us to disable this interceptors. Reviewers: eugenis, dvyukov Subscribers: srhines, kubamracek, krytarowski, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D57731 llvm-svn: 353351
* Fix sanitizer tool list used to generate sanitizer_common tests to be ↵Dan Liew2019-01-162-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | up-to-date. Summary: This replaces the sanitizer tool list (used for generating sanitizer_common configurations) with a tool list derived from existing build system information. Previously sanitizer_common had its own list of supported sanitizer tools. This was bad because it was out of sync with the rest of the build system. Notably it meant that the sanitizer_common runtime was only being tested on Darwin the ASan dylib and not the other sanitizer dylibs that are built for Darwin (LSan, TSan, and UBSan). Unfortunately enabling the tests against other sanitizer dylibs has lead to some test failures on Darwin. For now they've been marked as XFAIL until the failures can investigated properly. For Windows and Android we use the old sanitizer tool list to try avoid bot breakages. rdar://problem/47143078 Reviewers: kubamracek, george.karpenkov, yln, samsonov, vitalybuka, krytarowski Subscribers: srhines, mgorny, fedor.sergeev, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D55740 llvm-svn: 351398
* Revert little bad rebasing.David Carlier2019-01-151-1/+0
| | | | llvm-svn: 351191
* [Sanitizer] Intercept sl_add api on FreeBSD/NetBSDDavid Carlier2019-01-152-0/+27
| | | | | | | | | | Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56670 llvm-svn: 351189
* [Sanitizer] Disable getusershell interception for AndroidDavid Carlier2019-01-111-1/+1
| | | | | | | | | | Reviewers: vitalybuka, pcc, eugenis Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D56583 llvm-svn: 350965
* XFAIL getusershell.cc on Android.Matt Morehouse2019-01-111-0/+2
| | | | | | Android does not implement [set|get|end]usershell(). llvm-svn: 350935
* [Sanitizer] Intercept getusershellDavid Carlier2019-01-111-0/+21
| | | | | | | | | | | | - If entries are properly copied (there were a bug in FreeBSD implementation in earlier version), or list properly reset. Reviewers: vitalybuka, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56562 llvm-svn: 350919
* Re-disable the sanitizer_common/TestCases/Posix/getfsent.cc test. Recent ↵Kuba Mracek2019-01-031-1/+1
| | | | | | macOS versions don't have the /etc/fstab file any more so we cannot test getfsent/setfsent APIs on Darwin. llvm-svn: 350331
* [Sanitizer] Fix typo in funopen unit test.David Carlier2019-01-021-1/+1
| | | | llvm-svn: 350259
* [Sanitizer] Disable arc4random seeding apis on for Non NetBSD platforms.David Carlier2019-01-021-0/+6
| | | | | | | | | | | | - arc4random_stir / arc4random_addrandom had been made obsolete (and removed) from FreeBSD 12. Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56210 llvm-svn: 350249
* [Sanitizer] Enable funopen on FreeBSDDavid Carlier2019-01-021-0/+91
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56209 llvm-svn: 350248
* [sanitizer_common] Add test for popen()Michal Gorny2019-01-021-0/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D56153 llvm-svn: 350230
* [sanitizer_common] Add tests for more *putc and *getc variantsMichal Gorny2019-01-023-0/+45
| | | | | | | | | | | Add tests for the more character-oriented functions, that is: - fputc(), putc() and putchar() - getc_unlocked() - putc_unlocked() and putchar_unlocked() Differential Revision: https://reviews.llvm.org/D56152 llvm-svn: 350229
* [sanitizer_common] Rewrite more Posix tests to use assertsMichal Gorny2019-01-026-46/+26
| | | | | | | | | | Rewrite the tests for Posix functions that silently 'return 1' or 'exit(1)' on error, to instead verbosely report the error using assert. This is based on requests made in review of D56136. Differential Revision: https://reviews.llvm.org/D56149 llvm-svn: 350227
* [sanitizer_common] Add tests for more stdio.h functionsMichal Gorny2019-01-022-0/+60
| | | | | | | | | | | | | | | Add two new test cases that test the following stdio.h functions: - clearerr() - feof() - ferror() - fileno() - fgetc() - getc() - ungetc() Differential Revision: https://reviews.llvm.org/D56136 llvm-svn: 350225
* [Sanitizer] Enable getfsent api for DarwinDavid Carlier2018-12-291-1/+1
| | | | | | | | | | Reviewers: vitalybuka, kubamracek Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D56138 llvm-svn: 350138
* [Sanitizer] arc4random unit test missing case.David Carlier2018-12-281-0/+3
| | | | llvm-svn: 350124
* [Sanitizer] Intercept arc4random_buf / arc4random_addrandom on FreeBSD/NetBSDDavid Carlier2018-12-281-0/+62
| | | | | | | | | | | | | | | - Disabled on purpose on Android and Darwin platform (for now). - Darwin supports it, would need interception in its specific code before enabling it. - Linux does not support it but only via third party library. - Android supports it via bionic however it is known to have issue with older versions of the implementations. Can be enabled by an Android committer later on if necessary once there is more 'certainity'/been more tested. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56125 llvm-svn: 350123
* Enable posix regex interceptors on linux.Evgeniy Stepanov2018-12-271-1/+1
| | | | | | | | | | | | Summary: They happen to work out of the box. Reviewers: rtrieu, vitalybuka Subscribers: kubamracek, fedor.sergeev, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D56088 llvm-svn: 350103
* getfsent, unit test.David Carlier2018-12-271-0/+36
| | | | llvm-svn: 350100
* [Sanitizer] Enable FTS api on FreeBSDDavid Carlier2018-12-271-0/+42
| | | | | | | | | | Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56097 llvm-svn: 350090
* [Sanitizer] Enable POSIX regex api on FreeBSD.David Carlier2018-12-221-0/+71
| | | | | | | | | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56009 M lib/sanitizer_common/sanitizer_common_interceptors.inc M lib/sanitizer_common/sanitizer_platform_interceptors.h M lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc M lib/sanitizer_common/sanitizer_platform_limits_freebsd.h D test/sanitizer_common/TestCases/NetBSD/regex.cc A + test/sanitizer_common/TestCases/Posix/regex.cc llvm-svn: 350002
* [Sanitizer] Move the unit test in the right place.David Carlier2018-12-211-0/+54
| | | | llvm-svn: 349917
* [Sanitizer] Enable vis api on FreeBSDDavid Carlier2018-12-201-0/+247
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55923 llvm-svn: 349762
OpenPOWER on IntegriCloud