summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases/Posix
Commit message (Collapse)AuthorAgeFilesLines
...
* [Sanitizer] Expand FSEEK interception to FreeBSDDavid Carlier2018-12-111-0/+53
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55556 llvm-svn: 348888
* [Sanitizer] expand sysctl/getmntinfo/nl_langinfo to DarwinDavid Carlier2018-12-102-50/+2
| | | | | | | | | | Reviewers: vitalybuka, krytarowski, kubamracek Reviewed By: vitalybuka, krytarowski Differential Revision: https://reviews.llvm.org/D55473 llvm-svn: 348770
* [Sanitizer] getmntinfo support in FreeBSDDavid Carlier2018-12-061-0/+35
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55354 llvm-svn: 348500
* [Sanitizer] expand nl_langinfo interception to FreeBSDDavid Carlier2018-12-051-0/+20
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55327 llvm-svn: 348376
* Fix sanitizer unit testDavid Carlier2018-12-041-1/+1
| | | | llvm-svn: 348297
* [Sanitizer] intercept part of sysctl ApiDavid Carlier2018-12-041-0/+112
| | | | | | | | | | | | | - Distringuish what FreeBSD/NetBSD can and NetBSD specifics. - Fixing page size value collection. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55265 llvm-svn: 348293
* [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in testsVitaly Buka2018-12-011-2/+0
| | | | | | | | | | Reviewers: eugenis, jfb Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D55152 llvm-svn: 348061
* [Sanitizer] Adding setvbuf in supported platforms and other stream buffer ↵David Carlier2018-11-211-0/+81
| | | | | | | | | | | | | | | functions - Enabling setvbuf interceptions for non NetBSD platforms. - setbuf, setbuffer, setlinebuf as well. Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D54779 llvm-svn: 347426
* Revert "[Sanitizer] intercept setvbuf on other platforms where it is supported"David Carlier2018-11-201-75/+0
| | | | llvm-svn: 347358
* [Sanitizer] Unbreak non NetBSD builds.David Carlier2018-11-201-0/+2
| | | | llvm-svn: 347357
* [Sanitizer] intercept setvbuf on other platforms where it is supportedDavid Carlier2018-11-201-0/+73
| | | | | | | | | | | | Unit tests enabled only in platform tested. Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski, vitalybuka Differential Revision: https://reviews.llvm.org/D54739 llvm-svn: 347355
* Mark breaking sanitizer_common tests on NetBSDKamil Rytarowski2018-10-302-0/+4
| | | | | | | | | | Set XFAIL with appropriate configuration for: - NetBSD/getgroupmembership - Posix/dedup_token_length_test - Posix/readlinkat - get_module_and_offset_for_pc llvm-svn: 345651
* Fix Posix/devname_r for NetBSDKamil Rytarowski2018-10-081-0/+5
| | | | | | | | | | | | | | | | NetBSD returns a different type as a return value of devname_r(3) than FreeBSD and Darwin (int vs char*). This implies that checking for successful completion of this function has to be handled differently. This test used to work well, but was switched to fix Darwin, which broke NetBSD. Add a dedicated ifdef for NetBSD and make it functional again for this OS. llvm-svn: 343980
* [TSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-181-6/+22
| | | | | | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404 and other sanitizer allocators. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, no stack, no details, not too helpful nor informative. To improve the situation, detailed and structured common errors were defined and reported under the appropriate conditions. Common tests were generalized a bit to cover a slightly different TSan stack reporting format, extended to verify errno value and returned pointer value check is now explicit to facilitate debugging. Reviewers: dvyukov Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48087 llvm-svn: 334975
* [ASAN] fix fgets and fgets_fputs tests failurePeter Wu2018-06-121-2/+2
| | | | | | Some systems (Android) might not have /etc/passwd. Fixes r334450. llvm-svn: 334487
* [sanitizer] Add fgets, fputs and puts into sanitizer_commonPeter Wu2018-06-112-0/+38
| | | | | | | | | | | | | | | Summary: Add fgets, fputs and puts to sanitizer_common. This adds ASAN coverage for these functions, extends MSAN support from fgets to fputs/puts and extends TSAN support from puts to fputs. Fixes: https://github.com/google/sanitizers/issues/952 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46545 llvm-svn: 334450
* [MSan] Switch to common aligned allocs tests.Alex Shlyapnikov2018-06-091-2/+2
| | | | | | | | | | | | | | Summary: Switch to aligned_alloc and posix_memalign tests in sanitizer_common and delete the MSan-specific ones. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47968 llvm-svn: 334340
* [Sanitizers] Use proper substitution in common allocator test.Alex Shlyapnikov2018-06-081-4/+4
| | | | | | Use %env_tool_ops instead of %tool_options. llvm-svn: 334332
* [Sanitizers] Check alignment != 0 for aligned_alloc and posix_memalignAlex Shlyapnikov2018-06-081-0/+31
| | | | | | | | | | | | | | | Summary: Move the corresponding tests to the common folder (as all of the sanitizer allocators will support this feature soon) and add the checks specific to aligned_alloc to ASan and LSan allocators. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47924 llvm-svn: 334316
* [lsan] Try to fix test failure due to compiler optimizationPeter Wu2018-05-101-7/+4
| | | | | | | | | | | | | | Summary: The SanitizerCommon-lsan-x86_64-Linux test failed due to the address of the very first allocation ending up in the stack through "delete[]". Workaround this by performing another allocation. The issue was only present with optimization enabled, the test would pass with -O0. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46650 llvm-svn: 332020
* Add s390x to XFAIL for illegal_read/write_test.ccPetar Jovanovic2018-04-252-2/+2
| | | | | | | | | Follow up to r330840 and r330849. It seems that s390 is also not distinguishing illegal WRITE and READ memory access. Add s390x to XFAIL for the tests. llvm-svn: 330863
* Finetune supported arches for the tests added in r330840Petar Jovanovic2018-04-252-0/+2
| | | | | | | r330840 introduced two tests that may not be supported on all architectures. powerpc64 seems to be one of those. llvm-svn: 330849
* [mips] Implement GetWriteFlag() for mipsPetar Jovanovic2018-04-252-0/+27
| | | | | | | | | | | | | The read/write flag is set by manually decoding the instruction that caused the exception. It is implemented this way because the cause register which contains the needed flag was removed from the signal context structure which the user handler receives from the kernel. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D45768 llvm-svn: 330840
* [sanitizer] Make test compatible with DarwinVitaly Buka2018-03-262-3/+3
| | | | llvm-svn: 328467
* FreeBSD sanitizer common, intercept couple of more functionsVitaly Buka2018-03-238-1/+211
| | | | | | | | | | | | | | | Summary: Intercepts lstat, acct, access, faccessat and strlcpy/strlcat Patch by David CARLIER Reviewers: visa, vitalybuka Subscribers: krytarowski, fedor.sergeev, srhines, kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44432 llvm-svn: 328376
* Revert "Mmap interceptor new option, Write Exec runtime detector"Jonas Devlieghere2018-03-161-12/+0
| | | | | | | | | This reverts r327696 because it is failing on GreenDragon. http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/43605/ http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/10957/ llvm-svn: 327719
* Mmap interceptor new option, Write Exec runtime detectorVitaly Buka2018-03-161-0/+12
| | | | | | | | | | | | | | | | Summary: Following-up the refactoring of mmap interceptors, adding a new common option to detect PROT_WRITE|PROT_EXEC pages request. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: krytarowski, #sanitizers Differential Revision: https://reviews.llvm.org/D44194 llvm-svn: 327696
* Disable tests from r326852 on DarwinAdam Nemet2018-03-072-0/+2
| | | | | | | | | | Darwin needs xlocale.h but I see no precedence in the code how non-Posix headers like this are handled and I am not experienced with this code. Just disable the tests for now to recover the bots. rdar://38208146 llvm-svn: 326874
* [sanitizer] Move strxfrm interceptors into sanitizer_commonVitaly Buka2018-03-071-0/+19
| | | | llvm-svn: 326853
* [sanitizer] Add interceptors for wcsxfrm, wcsxfrm_lVitaly Buka2018-03-071-0/+19
| | | | | | | | | | | | | | Patch by Oliver Chang Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44133 llvm-svn: 326852
* [sanitizer] Move mmap interceptors into sanitizer_commonVitaly Buka2018-03-071-0/+11
| | | | | | | | | | Reviewers: devnexen, krytarowski, eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D44125 llvm-svn: 326851
* [sanitizer] Fix flakiness in the testsVitaly Buka2018-02-152-7/+2
| | | | | | | Seems tests fails if link already exists. Also removed duplicated part of tests. llvm-svn: 325194
* [sanitizer] Fix array sizes used for path in testsVitaly Buka2018-02-012-17/+5
| | | | llvm-svn: 324022
* Update readlink.c and readlinkat.c to use larger buffers on Darwin.Kuba Mracek2018-02-012-5/+17
| | | | llvm-svn: 324016
* [sanitizer] Move readlinkat.c test from Linux to PosixVitaly Buka2018-01-311-0/+25
| | | | llvm-svn: 323837
* [sanitizer] Fix tests on Android and DarwinVitaly Buka2018-01-301-4/+4
| | | | llvm-svn: 323834
* [sanitizer] Add interceptors for readlinkat, name_to_handle_at, ↵Vitaly Buka2018-01-301-0/+32
| | | | | | | | | | | | | | | | | | | | | open_by_handle_at Summary: Also move existing readlink msan interceptor to sanitizer_common. Fixes google/sanitizers#908 Patch by Oliver Chang Reviewers: vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42630 llvm-svn: 323825
* [tsan] Deadly signal handler for tsanVitaly Buka2017-11-134-9/+0
| | | | | | | | | | | | Summary: https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39929 llvm-svn: 318078
* [sanitizer] Include stack trace check into signal testsVitaly Buka2017-11-111-1/+4
| | | | llvm-svn: 317963
* [ubsan] Fix ubsan tests broken by linking as C instead of C++Vitaly Buka2017-11-111-3/+3
| | | | llvm-svn: 317958
* [msan] Deadly signal handler for msanVitaly Buka2017-11-104-4/+0
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39826 llvm-svn: 317864
* [sanitizer] Re-disable several tests on Android.Evgeniy Stepanov2017-10-112-2/+2
| | | | | | The tests have been enabled by accident in r315389. llvm-svn: 315396
* [ubsan] Support signal specific options in ubsanVitaly Buka2017-09-233-4/+1
| | | | | | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Standalone ubsan needs signal and sigaction handlers and interceptors. Plugin mode should rely on parent tool. Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37895 llvm-svn: 314052
* [lsan] Deadly signal handler for lsanVitaly Buka2017-09-224-4/+4
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, dberris, kubamracek, krytarowski Differential Revision: https://reviews.llvm.org/D37608 llvm-svn: 314041
* [sanitizer] Fix check for i386 Android in lit testsVitaly Buka2017-09-162-2/+2
| | | | llvm-svn: 313452
* [sanitizer] Disable sanitizer test which already fails on Android i386Vitaly Buka2017-09-162-0/+4
| | | | llvm-svn: 313447
* [lsan] Disable clang-format on few RUN: statementsVitaly Buka2017-09-151-1/+4
| | | | llvm-svn: 313321
* [compiler-rt] Add test for not fully implemented dump_registersVitaly Buka2017-09-131-0/+20
| | | | | | | | | | Reviewers: eugenis, alekseyshl Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D37765 llvm-svn: 313120
* [compiler-rt] Move dump_instruction_bytes and dump_registers into ↵Vitaly Buka2017-09-131-0/+21
| | | | | | | | | | | | | | sanitizer_common Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37766 llvm-svn: 313117
* [ubsan] Enable UBsan in sanitizer_common testsVitaly Buka2017-09-095-0/+5
| | | | | | | | | | | | | | Summary: Failing tests just marked as UNSUPPORTED or XFAIL. Some of them can be easily supported, but I'll do this in separate patches. Reviewers: eugenis, alekseyshl Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37630 llvm-svn: 312860
OpenPOWER on IntegriCloud