aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Install new LLVM license structure and new developer policy.Chandler Carruth2019-01-191-16/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This installs the new developer policy and moves all of the license files across all LLVM projects in the monorepo to the new license structure. The remaining projects will be moved independently. Note that I've left odd formatting and other idiosyncracies of the legacy license structure text alone to make the diff easier to read. Critically, note that we do not in any case *remove* the old license notice or terms, as that remains necessary until we finish the relicensing process. I've updated a few license files that refer to the LLVM license to instead simply refer generically to whatever license the LLVM project is under, basically trying to minimize confusion. This is really the culmination of so many people. Chris led the community discussions, drafted the policy update and organized the multi-year string of meeting between lawyers across the community to figure out the strategy. Numerous lawyers at companies in the community spent their time figuring out initial answers, and then the Foundation's lawyer Heather Meeker has done *so* much to help refine and get us ready here. I could keep going on, but I just want to make sure everyone realizes what a huge community effort this has been from the begining. Differential Revision: https://reviews.llvm.org/D56897 llvm-svn: 351631
* [hwasan] Madvise away unused shadow.Evgeniy Stepanov2019-01-194-1/+100
| | | | | | | | | | | | | | | | | | Summary: Whenever a large shadow region is tagged to zero, madvise(DONT_NEED) as much of it as possible. This reduces shadow RSS on Android by 45% or so, and total memory use by 2-4%, probably even more on long running multithreaded programs. CPU time seems to be in the noise. Reviewers: kcc, pcc Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D56757 llvm-svn: 351620
* [safestack] Add ThreadId type as uint64_tVitaly Buka2019-01-182-4/+11
| | | | | | | | | | Reviewers: krytarowski, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56937 llvm-svn: 351607
* [safestack] Remove dependency of SafeStack on sanitizer_commonVitaly Buka2019-01-184-35/+138
| | | | | | | | | | | | | | Summary: SafeStack needs just few functions from there, but sanitizer_common introduces conflicts with other runtimes, e.g. SCUDO. Reviewers: eugenis, kcc, cryptoad Subscribers: mgorny, krytarowski, fedor.sergeev, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D56886 llvm-svn: 351506
* [safestack] Replace statics with unnamed namespaceVitaly Buka2019-01-181-29/+33
| | | | | | | | | | Reviewers: eugenis Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D56888 llvm-svn: 351503
* xray: Add missing header to list of installed headers.Peter Collingbourne2019-01-171-0/+1
| | | | | | | | Spotted by gn's llvm/utils/gn/build/sync_source_lists_from_cmake.py script. Differential Revision: https://reviews.llvm.org/D56797 llvm-svn: 351479
* [libFuzzer][MSVC] Make attribute-use compatible with MSVCJonathan Metzman2019-01-177-24/+46
| | | | | | | | | | | | | | Summary: Replace attributes with macros that use equivalent declspecs for MSVC. Reviewers: vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D56512 llvm-svn: 351456
* Fix sanitizer tool list used to generate sanitizer_common tests to be ↵Dan Liew2019-01-166-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* compiler-rt tests: Unbreak cmake with LLVM_ENABLE_PIC=OFF on macNico Weber2019-01-162-18/+22
| | | | | | | | The LTO target doesn't exist with LLVM_ENABLE_PIC turned off. Differential Revision: https://reviews.llvm.org/D56800 llvm-svn: 351373
* Make compiler-rt CMakeLists.txt formatting a bit more like LLVM's usual ↵Nico Weber2019-01-164-13/+25
| | | | | | formatting llvm-svn: 351363
* [TSan] Use switches when dealing with enumsJulian Lettner2019-01-163-86/+87
| | | | | | | | | | | | | | | | | | Summary: Small refactoring: replace some if-else cascades with switches so that the compiler warns us about missing cases. Maybe found a small bug? Reviewers: dcoughlin, kubamracek, dvyukov, delcypher, jfb Reviewed By: dvyukov Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D56295 llvm-svn: 351288
* compiler-rt/test: Bring back -pie on Android.Peter Collingbourne2019-01-151-1/+1
| | | | | | | | Looks like the sanitizer-x86_64-linux-android bot started failing because -pie is still needed when targeting API levels < 16 (which is the case by default for arm and i686). llvm-svn: 351270
* [libFuzzer] Remove unstable edge handlingJonathan Metzman2019-01-1511-294/+9
| | | | | | | | | | Summary: Remove code for handling unstable edges from libFuzzer since it has not been found useful. Differential Revision: https://reviews.llvm.org/D56730 llvm-svn: 351262
* compiler-rt/test: Add a couple of convenience features for Android.Peter Collingbourne2019-01-154-1/+18
| | | | | | | | | | | | | | | | Add a ANDROID_SERIAL_FOR_TESTING CMake variable. This lets you run the tests with multiple devices attached without having to set ANDROID_SERIAL. Add a mechanism for pushing files to the device. Currently most sanitizers require llvm-symbolizer and the sanitizer runtime to be pushed to the device. This lets the sanitizer make this happen automatically before running the tests by specifying the paths in the lit.site.cfg file. Differential Revision: https://reviews.llvm.org/D56712 llvm-svn: 351260
* [profile] Sync up InstrProfData.inc with llvm copy /NFCRong Xu2019-01-151-10/+10
| | | | llvm-svn: 351257
* compiler-rt/test: Clean up Android specific workarounds in lit.common.cfg.Peter Collingbourne2019-01-151-3/+4
| | | | | | | | | | | | -pie -Wl,--enable-new-dtags are no longer needed because the driver passes them by default as of r316606. Prepend -fuse-ld=gold instead of appending it so that the linker can be overridden using COMPILER_RT_TEST_COMPILER_CFLAGS. Differential Revision: https://reviews.llvm.org/D56697 llvm-svn: 351252
* Update year in license filesHans Wennborg2019-01-151-1/+1
| | | | | | | In last year's update (D48219) it was suggested that the release manager might want to do this, so here we go. llvm-svn: 351194
* Revert little bad rebasing.David Carlier2019-01-151-1/+0
| | | | llvm-svn: 351191
* [Sanitizer] Intercept sl_add api on FreeBSD/NetBSDDavid Carlier2019-01-158-5/+92
| | | | | | | | | | Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56670 llvm-svn: 351189
* [compiler-rt] alignment-assumption-blacklist.cpp test apparently passes on ↵Roman Lebedev2019-01-151-5/+0
| | | | | | android, un-XFAIL it. llvm-svn: 351184
* [compiler-rt] fuzzer-alignment-assumption.test: fixup the expected column numberRoman Lebedev2019-01-151-1/+1
| | | | llvm-svn: 351181
* [compiler-rt][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1520-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the compiler-rt part. The clang part is D54589. This is a second commit, the original one was r351106, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Now, i have fundamentally changed the testing approach: i malloc a few bytes, intentionally mis-align the pointer (increment it by one), and check that. Also, i have decreased the expected alignment. This hopefully should be enough to pacify all the bots. If not, i guess i might just drop the two 'bad' tests. Reviewers: filcab, vsk, #sanitizers, vitalybuka, rsmith, morehouse Reviewed By: morehouse Subscribers: rjmccall, krytarowski, rsmith, kcc, srhines, kubamracek, dberris, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54590 llvm-svn: 351178
* Explicitly set C++ standard for `Posix/no-fd.cc` ASan test.Dan Liew2019-01-151-1/+1
| | | | | | | | | | | | | | | | | Summary: The test uses `nullptr` which can break running the test if the compiler happens to be using something older than C++11 as the default language standard. Avoid this by explicitly setting the standard. rdar://problem/47253542 Reviewers: eugenis, yln, vitalybuka Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56667 llvm-svn: 351169
* Revert alignment assumptions changesVlad Tsyrklevich2019-01-1520-369/+0
| | | | | | | Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These changes fail on the sanitizer bots. llvm-svn: 351159
* Silence failing testsVlad Tsyrklevich2019-01-152-2/+2
| | | | | | | | | r351134 tried to disable these tests by using 'UNSUPPORTED: *' but '*' is not supported for UNSUPPORTED like it is for XFAIL. Update these tests to use XFAIL for now in order to silence x86_64-linux and x86_64-linux-android. llvm-svn: 351153
* [libFuzzer][MSVC] Use alternatename for ext functionsJonathan Metzman2019-01-153-57/+84
| | | | | | | | | | | | | | | | | Summary: Use alternatename for external functions only when using MSVC since Clang doesn't support it and MSVC doesn't support Clang's method (weak aliases). Reviewers: morehouse Reviewed By: morehouse Subscribers: rnk, thakis, mgorny Differential Revision: https://reviews.llvm.org/D56514 llvm-svn: 351152
* [compiler-rt] UBSan: just completely disable two alignment-assumption tests ↵Roman Lebedev2019-01-142-8/+4
| | | | | | | | | | | | | for now. And they are faling on clang-cmake-armv7-full too. *ONLY* these two. I'm not sure what to make of it. Perhaps doing a malloc and checking that pointer will make them fail as expected? llvm-svn: 351134
* [compiler-rt] UBSan: Disable 3 of the new alignment assumption tests on android.Roman Lebedev2019-01-143-5/+10
| | | | | | | | | | | Once again, just like with r338296, these tests seem to only have failed sanitizer-x86_64-linux-android, so let's just disable them, since that seems like the pre-established practice here.. To be noted, they failed on some configs there, but not all, so it is not XFAIL. llvm-svn: 351119
* [compiler-rt] Add option to disable libc++ buildShoaib Meenai2019-01-141-9/+13
| | | | | | | | | | | | | Having libc++ checked out doesn't necessarily mean it should be built; for example, the same source tree might be used for multiple build configurations, and libc++ might not build in some of those configurations. Add an option to compiler-rt's build to disable building libc++. This defaults to ON, so it shouldn't change any existing build configurations. Differential Revision: https://reviews.llvm.org/D56479 llvm-svn: 351117
* [compiler-rt] Update ubsan_interface.inc with alignment assumption handlersRoman Lebedev2019-01-141-0/+2
| | | | | | | Somehow this escaped my local testing. A follow-up for r351106. llvm-svn: 351110
* [test] Disable sunrpc tests when rpc/xdr.h is missingMichal Gorny2019-01-149-12/+20
| | | | | | | | | | | | | | | | | Disable tests requiring sunrpc when the relevant headers are missing. In order to accommodate that, move the header check from sanitizer_common to base-config-ix, and define the check result as a global variable there. Use it afterwards both for definition needed by sanitizer_common, and to control 'sunrpc' test feature. While at it, remove the append_have_file_definition macro that was used only once, and no longer fits the split check-definition. Bug report: https://github.com/google/sanitizers/issues/974 Differential Revision: https://reviews.llvm.org/D47819 llvm-svn: 351109
* [compiler-rt][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1419-0/+366
| | | | | | | | | | | | | | | | | | Summary: This is the compiler-rt part. The clang part is D54589. Reviewers: filcab, vsk, #sanitizers, vitalybuka, rsmith, morehouse Reviewed By: morehouse Subscribers: rjmccall, krytarowski, rsmith, kcc, srhines, kubamracek, dberris, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54590 llvm-svn: 351106
* [asan] Add fallback for Thumb after r350139Diana Picus2019-01-143-2/+13
| | | | | | | | | | | | | | This reverts r350806 which marked some tests as UNSUPPORTED on ARM and instead reintroduces the old code path only for Thumb, since that seems to be the only target that broke. It would still be nice to find the root cause of the breakage, but with the branch point for LLVM 8.0 scheduled for next week it's better to put things in a stable state while we investigate. Differential Revision: https://reviews.llvm.org/D56594 llvm-svn: 351040
* [sanitizer] Move android's GetPageSize to a header (NFC)Evgeniy Stepanov2019-01-122-4/+13
| | | | | | | No need to pay function call overhead for a function that returns a constant. llvm-svn: 350983
* sanitizer_common: Change gen_dynamic_list.py to take a -o argument instead ↵Peter Collingbourne2019-01-112-12/+15
| | | | | | | | | | | of writing to stdout. This makes the script a little more gn friendly; gn does not support redirecting the output of a script. Differential Revision: https://reviews.llvm.org/D56579 llvm-svn: 350980
* [CMake] Fix standalone build after LLVM exports utility targetsStefan Granitz2019-01-111-2/+0
| | | | | | | LLVM started exporting targets for utilites with https://reviews.llvm.org/rL350959, which broke compiler-rt standalone builds because it was used to define FileCheck manually. Changed this, so FileCheck gets imported now. llvm-svn: 350973
* [Sanitizer] Disable getusershell interception for AndroidDavid Carlier2019-01-112-2/+2
| | | | | | | | | | Reviewers: vitalybuka, pcc, eugenis Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D56583 llvm-svn: 350965
* Provide storage for `true_type::value` and `false_type::value`.Dan Liew2019-01-112-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes linker errors that occurs when the `sanitizer_type_traits_test.cc` is built without optimizations. The error occurs because the test tries to take a reference. A possible workaround is to give the GTest macros take boolean rvalues by doing something like: ``` ASSERT_TRUE(bool(is_same<uptr, uptr>::value)); ``` However this only hides the problem. Unfortunately Using `constexpr` won't fix the problem unless we are using C++17. Reviewers: vitalybuka, kubamracek, george.karpenkov, yln Subscribers: mgorny, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56035 llvm-svn: 350940
* 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-113-0/+38
| | | | | | | | | | | | - 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
* [TSan] Remove ignore_interceptors_accesses flagJulian Lettner2019-01-105-91/+35
| | | | | | | | | | | | | | | | | | | | | | Summary: It has been superseded by the `ignore_noninstrumented_modules` flag and is no longer needed. Also simplify a test that checks that `mmap_interceptor` respects ignore annotations (`thr->ignore_reads_and_writes `). Relevant: https://reviews.llvm.org/rL269855 <rdar://problem/46263073> Remove obsolete Apple-specific suppression option Reviewers: dcoughlin, kubamracek, dvyukov, delcypher Reviewed By: dvyukov Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55075 llvm-svn: 350883
* [sanitizer_common] Define __sanitizer_FILE on NetBSDMichal Gorny2019-01-104-12/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D56109 llvm-svn: 350882
* [sanitizer_common] Remove support for tirpc/rpc/xdr.hMichal Gorny2019-01-104-11/+2
| | | | | | | | | | | | | Remove the partial support for rpc/xdr.h from libtirpc. Since it is an entirely external library, we ought to build it sanitized separately and not attempt to intercept like the libc implementation. Besides, the existing code for tirpc support was neither complete nor working. Noted by @krytarowski. Differential Revision: https://reviews.llvm.org/D47817 llvm-svn: 350881
* [compiler-rt][builtins][PowerPC] Implemented __floattitf builtin on PowerPCAmy Kwan2019-01-104-0/+305
| | | | | | | | | | | | | This patch implements the long double __floattitf (int128_t) method for PowerPC -- specifically to convert a 128 bit integer into a long double (IBM double-double). To invoke this method, one can do so by linking against compiler-rt, via the --rtlib=compiler-rt command line option supplied to clang. Differential Revision: https://reviews.llvm.org/D54313/ llvm-svn: 350818
* [compiler-rt][builtins][PowerPC] Implemented __fixunstfti builtin on PowerPCAmy Kwan2019-01-104-0/+865
| | | | | | | | | | | | | | | | | | This patch implements the __uint128_t __fixunstfti (long double) method for PowerPC -- specifically to convert a long double (IBM double-double) to an unsigned 128 bit integer. The general approach of this algorithm is to convert the high and low doubles of the long double and add them together if the doubles fit within 64 bits. However, additional adjustments and scaling is performed when the high or low double does not fit within a 64 bit integer. To invoke this method, one can do so by linking against compiler-rt, via the --rtlib=compiler-rt command line option supplied to clang. Differential Revision: https://reviews.llvm.org/D54911 llvm-svn: 350815
* [asan] Mark tests as UNSUPPORTED on armDiana Picus2019-01-102-2/+2
| | | | | | | | | | Temporarily mark a couple of tests as UNSUPPORTED until we figure out why they fail on the thumb bots. The failure was introduced in r350139 - Add support for background thread on NetBSD in ASan. llvm-svn: 350806
* i[Sanitizer] Enable pututxline interceptionDavid Carlier2019-01-101-1/+13
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56495 llvm-svn: 350796
* [libfuzzer][MSVC] Make calls to builtin functions work with MSVCJonathan Metzman2019-01-096-25/+127
| | | | | | | | | | | | | | | | | | Summary: Replace calls to builtin functions with macros or functions that call the Windows-equivalents when targeting windows and call the original builtin functions everywhere else. This change makes more parts of libFuzzer buildable with MSVC. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: mgorny, rnk, thakis Differential Revision: https://reviews.llvm.org/D56439 llvm-svn: 350766
* [asan] Disable TSD dtor leak unit tests on FreeBSD x86 64David Carlier2019-01-091-0/+2
| | | | | | | | | | | | - Assertion fails in the third iteration. Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56497 llvm-svn: 350744
* [test] Detect glibc-2.27+ and XFAIL appropriate testsMichal Gorny2019-01-093-0/+25
| | | | | | | | | | | | XFAIL the tests known to fail with glibc-2.27+. This takes away the burden of handling known failures from users, and ensures that we will be verbosely informed when they actually start working again. Bug report: https://bugs.llvm.org/show_bug.cgi?id=37804 Differential Revision: https://reviews.llvm.org/D56062 llvm-svn: 350717