summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan
Commit message (Collapse)AuthorAgeFilesLines
...
* [msan] Fix msan_test.cc by checking bind results before assuming IPv6 supported.Vitaly Buka2017-04-131-4/+13
| | | | llvm-svn: 300250
* Revert "[msan] Fix msan_test broken after r299884."Vitaly Buka2017-04-131-2/+2
| | | | | | | | This does not fix the test, it still fails to bind. This reverts commit r300150. llvm-svn: 300249
* [msan] Fix msan_test broken after r299884.Vitaly Buka2017-04-131-2/+2
| | | | | | | | | | | | | Bind to ANY as some machines may have IPv6 support but without IPv6 on loopback interface. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31998 llvm-svn: 300150
* [msan] Fix invalid use of vector constructor introduced by r299884.Vitaly Buka2017-04-131-1/+1
| | | | llvm-svn: 300149
* [msan] Choose in runtime if IPv4 or IPv6 are supported.Vitaly Buka2017-04-102-9/+54
| | | | | | | | | | | | Summary: This reverts commit cab5051c691ce27a7ffac41e8e76ceb222ad9549. Reviewers: eugenis Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D31894 llvm-svn: 299884
* [msan] Wrap sockaddr_in and socket for future IPv6 support.Vitaly Buka2017-04-101-51/+77
| | | | | | | | | | Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31893 llvm-svn: 299859
* [msan] Reorder unittests for future parametrization.Vitaly Buka2017-04-101-68/+68
| | | | | | | | | | Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31892 llvm-svn: 299858
* [sanitizer] Move fread and fwrite interceptors to sanitizer_commonMaxim Ostapenko2017-03-301-8/+0
| | | | | | | | {M, T, E}San have fread and fwrite interceptors, let's move them to sanitizer_common to enable ASan checks as well. Differential Revision: https://reviews.llvm.org/D31456 llvm-svn: 299061
* [sanitizers] Fix get_groups interceptor in sanitizer ↵Kostya Serebryany2017-03-291-0/+15
| | | | | | (https://reviews.llvm.org/D31332, patch by Martin Liška) llvm-svn: 299036
* [msan] Intercept wcsncpy, wcsnlen.Evgeniy Stepanov2017-03-141-0/+21
| | | | llvm-svn: 297793
* [msan] Test for _mm_getcsr and _mm_setcsr (r296848).Evgeniy Stepanov2017-03-031-0/+12
| | | | llvm-svn: 296849
* Revert "[sancov] moving sancov rt to sancov/ directory"Mike Aizatsky2017-01-121-1/+0
| | | | | | | | This reverts commit https://reviews.llvm.org/rL291734 Reason: mac breakage http://lab.llvm.org:8080/green//job/clang-stage1-configure-RA_build/28798/consoleFull#1657087648e9a0fee5-ebcc-4238-a641-c5aa112c323e llvm-svn: 291736
* [sancov] moving sancov rt to sancov/ directoryMike Aizatsky2017-01-121-0/+1
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28541 llvm-svn: 291734
* Make cmake link flag naming consistentFrancis Ricci2017-01-101-3/+3
| | | | | | | | | | | | | | | | | | | Summary: The build system was inconsistent in its naming conventions for link flags. This patch changes all uses of LINKFLAGS to LINK_FLAGS, for consistency with cmake's LINK_FLAGS property. This patch should make it easier to search the source code for uses of link flags, as well as providing the benefit of improved style and consistency. Reviewers: compnerd, beanz Subscribers: kubabrecka, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28506 llvm-svn: 291539
* [compiler-rt] Move logic which replace memcpy interceptor with memmove from ↵Vitaly Buka2016-12-271-1/+0
| | | | | | | | | | | | asan to sanitizer_common. Reviewers: eugenis Subscribers: kubabrecka, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D28074 llvm-svn: 290626
* Fix interceptors setup broken after r290382Vitaly Buka2016-12-231-3/+1
| | | | | | | | | | | | Summary: We setup these interceptors twice which hangs test on windows. Reviewers: eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D28070 llvm-svn: 290393
* Replace WRAP in interceptors with memset, memmove and memcpy implementationVitaly Buka2016-12-221-16/+18
| | | | | | | | | | | | | | Summary: According https://reviews.llvm.org/D27659#625093 WRAP adds confusing stack frame. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D28039 llvm-svn: 290382
* Revert r289690 "[sanitizer] intercept bstring functions, patch by Kuang-che ↵Hans Wennborg2016-12-151-0/+5
| | | | | | | | Wu (https://reviews.llvm.org/D27659)" It breaks programs on Mac. See comments on the code review for details. llvm-svn: 289864
* [sanitizer] intercept bstring functions, patch by Kuang-che Wu ↵Kostya Serebryany2016-12-141-5/+0
| | | | | | (https://reviews.llvm.org/D27659) llvm-svn: 289690
* [MSAN][MIPS] Fix fork.cc test on MIPSSagar Thakur2016-12-081-3/+12
| | | | | | | | | Summary: For platforms which support slow unwinder only, we restrict the store context size to 1, basically only storing the current pc. We do this because the slow unwinder which is based on libunwind is not async signal safe and causes random freezes in forking applications as well as in signal handlers. Reviewed by eugenis. Differential: D23107 llvm-svn: 289027
* Release memory to OS only when the requested range covers the entire pageEvgeniy Stepanov2016-11-301-3/+6
| | | | | | | | | | | | | | | | | Summary: The current code was sometimes attempting to release huge chunks of memory due to undesired RoundUp/RoundDown interaction when the requested range is fully contained within one memory page. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D27228 llvm-svn: 288271
* Return memory to OS right after free (not in the async thread).Evgeniy Stepanov2016-11-291-1/+3
| | | | | | | | | | | | | | | | | | Summary: In order to avoid starting a separate thread to return unused memory to the system (the thread interferes with process startup on Android, Zygota waits for all threads to exit before fork, but this thread never exits), try to return it right after free. Reviewers: eugenis Subscribers: cryptoad, filcab, danalbert, kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D27003 llvm-svn: 288091
* Don't use internal symbolizer if we are in process of reporting Out-of-Memory.Vitaly Buka2016-09-291-2/+2
| | | | | | Reviewed by eugenis offline, as reviews.llvm.org is down. llvm-svn: 282805
* [msan] Fix second parameter in MsanReallocate from previous commit.Maxim Ostapenko2016-09-261-1/+1
| | | | | | | It's wrong to pass to MsanReallocate a pointer that MSan allocator doesn't own. Use nullptr instead of ptr to prevent possible (still unlikely) failure. llvm-svn: 282390
* [asan, msan] Fix reallocation logic when IsInDlsymAllocPool(ptr) is true.Maxim Ostapenko2016-09-261-1/+7
| | | | llvm-svn: 282389
* [msan] Prevent initialization failure with newer (2.23+) glibc in use.Maxim Ostapenko2016-09-231-12/+31
| | | | | | | | | | This patch is pretty the same as http://reviews.llvm.org/D20235 that we used for ASan. Using the same hack for MSan fixes its initialization with newer Glibc in use. Differential Revision: https://reviews.llvm.org/D24736 llvm-svn: 282232
* [compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-0/+10
| | | | | | | | | | | | The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 llvm-svn: 281657
* [asan] first attempt at releasing free-d memory back to the system using ↵Kostya Serebryany2016-08-261-2/+2
| | | | | | madvise. Requires quite some tuning. llvm-svn: 279887
* [CMake] Connect Compiler-RT targets to LLVM Runtimes directoryChris Bieneman2016-08-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch builds on LLVM r279776. In this patch I've done some cleanup and abstracted three common steps runtime components have in their CMakeLists files, and added a fourth. The three steps I abstract are: (1) Add a top-level target (i.e asan, msan, ...) (2) Set the target properties for sorting files in IDE generators (3) Make the compiler-rt target depend on the top-level target The new step is to check if a command named "runtime_register_component" is defined, and to call it with the component name. The runtime_register_component command is defined in llvm/runtimes/CMakeLists.txt, and presently just adds the component to a list of sub-components, which later gets used to generate target mappings. With this patch a new workflow for runtimes builds is supported. The new workflow when building runtimes from the LLVM runtimes directory is: > cmake [...] > ninja runtimes-configure > ninja asan The "runtimes-configure" target builds all the dependencies for configuring the runtimes projects, and runs CMake on the runtimes projects. Running the runtimes CMake generates a list of targets to bind into the top-level CMake so subsequent build invocations will have access to some of Compiler-RT's targets through the top-level build. Note: This patch does exclude some top-level targets from compiler-rt libraries because they either don't install files (sanitizer_common), or don't have a cooresponding `check` target (stats). llvm-svn: 279863
* Additional update missed by r279793, should hopefully make the PPC sanitizer ↵Richard Smith2016-08-261-0/+1
| | | | | | bots happy again. llvm-svn: 279798
* [sanitizer] enable random shuffling the memory chunks inside the allocator, ↵Kostya Serebryany2016-08-261-0/+1
| | | | | | under a flag. Set this flag for the scudo allocator, add a test. llvm-svn: 279793
* [sanitizer] change SizeClassAllocator64 to accept just one template ↵Kostya Serebryany2016-08-251-11/+18
| | | | | | parameter instead of 5. First, this will make the mangled names shorter. Second, this will make adding more parameters simpler. llvm-svn: 279771
* msan: Enable 48-bit VMA support on aarch64Adhemerval Zanella2016-08-252-8/+49
| | | | | | | | | | | | | This patch adds 48-bits VMA support for msan on aarch64. As current mappings for aarch64, 48-bit VMA also supports PIE executable. The 48-bits segments only cover the usual PIE/default segments plus some more segments (262144GB total, 0.39% total VMA). Memory avaliability can be increase by adding multiple application segments like 39 and 42 mapping (some mappings were added on this patch as well). Tested on 39 and 48-bit VMA kernels on aarch64. llvm-svn: 279752
* [msan] Disable prlimit test on glibc < 2.13.Evgeniy Stepanov2016-08-201-0/+8
| | | | llvm-svn: 279352
* [MSAN][MIPS] Changed memory mapping to support pie executable.Sagar Thakur2016-08-161-8/+20
| | | | | | | Reviewed by eugenis Differential: D22993 llvm-svn: 278793
* [sanitizer] use 32-bit offset instead of 64-bit pointers in the 64-bit ↵Kostya Serebryany2016-08-091-1/+1
| | | | | | allocator's transfer batches. This saves 2x memory for the transfer batches (up to ~1.5% overall in some cases) llvm-svn: 278179
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | 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
* [sanitizers] introduce yet another API function: ↵Kostya Serebryany2016-06-161-10/+16
| | | | | | __sanitizer_install_malloc_and_free_hooks llvm-svn: 272943
* __builtin_ia32_storeups is no more. Replace it with xmmintrin.h intrinsic.Benjamin Kramer2016-05-311-1/+1
| | | | llvm-svn: 271257
* Revert "[sanitizer] Move *fstat to the common interceptors"Benjamin Kramer2016-05-191-3/+62
| | | | | | | This reverts commit r269981. Breaks msan tests on linux http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24019/steps/test%20standalone%20compiler-rt/logs/stdio llvm-svn: 270076
* [sanitizer] Move *fstat to the common interceptorsMike Aizatsky2016-05-181-62/+3
| | | | | | | | | | | | | | | | | | Summary: Adds *fstat to the common interceptors. Removes the now-duplicate fstat interceptor from msan/tsan This adds fstat to asan/esan, which previously did not intercept it. Resubmit of http://reviews.llvm.org/D20318 with ios build fixes. Reviewers: eugenis, vitalybuka, aizatsky Subscribers: zaks.anna, kcc, bruening, kubabrecka, srhines, danalbert, tberghammer Differential Revision: http://reviews.llvm.org/D20350 llvm-svn: 269981
* Revert "[sanitizer] Move *fstat to the common interceptors"Mike Aizatsky2016-05-171-3/+62
| | | | | | This reverts commit http://reviews.llvm.org/rL269856 llvm-svn: 269863
* [sanitizer] Move *fstat to the common interceptorsMike Aizatsky2016-05-171-62/+3
| | | | | | | | | | | | | | | | Summary: Adds *fstat to the common interceptors. Removes the now-duplicate fstat interceptor from msan/tsan This adds fstat to asan/esan, which previously did not intercept it. Reviewers: eugenis, vitalybuka, aizatsky Subscribers: tberghammer, danalbert, srhines, kubabrecka, bruening, kcc Differential Revision: http://reviews.llvm.org/D20318 llvm-svn: 269856
* [sanitizer] Move *stat to the common interceptorsEvgeniy Stepanov2016-05-111-42/+0
| | | | | | | | | | | Adds *stat to the common interceptors. Removes the now-duplicate *stat interceptor from msan/tsan/esan. This adds *stat to asan, which previously did not intercept it. Patch by Qin Zhao. llvm-svn: 269223
* [MSan] Add a test for vararg with lots of non-vararg arguments.Marcin Koscielnicki2016-05-091-0/+14
| | | | | | | | | This is a testcase for http://llvm.org/PR27646, hitting the bug on x86_64, aarch64, mips. Differential Revision: http://reviews.llvm.org/D19944 llvm-svn: 268981
* [sanitizer] Move stat/__xstat to the common interceptorsMike Aizatsky2016-05-031-21/+0
| | | | | | | | | | | | | | | | | | Summary: Adds stat/__xstat to the common interceptors. Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan. This adds stat/__xstat to asan, which previously did not intercept it. Resubmit of http://reviews.llvm.org/D19875 with win build fixes. Reviewers: aizatsky, eugenis Subscribers: tberghammer, llvm-commits, danalbert, vitalybuka, bruening, srhines, kubabrecka, kcc Differential Revision: http://reviews.llvm.org/D19890 llvm-svn: 268466
* Revert "[sanitizer] Move stat/__xstat to the common interceptors"Mike Aizatsky2016-05-031-0/+21
| | | | | | | | This reverts commit 268440 because it breaks the windows bot. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21425/steps/build%20compiler-rt/logs/stdio llvm-svn: 268448
* [sanitizer] Move stat/__xstat to the common interceptorsMike Aizatsky2016-05-031-21/+0
| | | | | | | | | | | | | | | | Summary: Adds stat/__xstat to the common interceptors. Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan. This adds stat/__xstat to asan, which previously did not intercept it. Reviewers: aizatsky, eugenis Subscribers: tberghammer, danalbert, srhines, kubabrecka, llvm-commits, vitalybuka, eugenis, kcc, bruening Differential Revision: http://reviews.llvm.org/D19875 llvm-svn: 268440
* [msan] Tests for vector compare intrinsics.Evgeniy Stepanov2016-04-291-1/+42
| | | | llvm-svn: 267967
* [MSan] [PowerPC] Dereference function descriptors when recording stack origins.Marcin Koscielnicki2016-04-271-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D19543 llvm-svn: 267795
OpenPOWER on IntegriCloud