summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizers] Redirect stdout and stderr to TASK_LOGEric Christopher2019-12-121-1/+1
| | | | | | | | | | | | At some point cpplint.py became very noisy during a build spewing a few hundred lines of "Done processing..." even with SILENT=1 in cmake. This attempts to redirect the stdout of "Done processing" to the task log along with any errors. Tested by this with and without SILENT=1 to check things. Differential Revision: https://reviews.llvm.org/D71402 Reviewed By: eugenis
* Revert unintentional change to compiler-rt as part of the __bit_reference ↵Eric Christopher2019-12-121-1/+1
| | | | revert.
* Temporarily Revert "[libc++] Fix -Wdeprecated-copy warnings in __bit_reference"Eric Christopher2019-12-121-1/+1
| | | | | | as it's causing test failures due to mismatched visibility. This reverts commit 02bb20223bda5add729402962c70d0ebd0d98af2.
* [compiler-rt] cpplint of inc files in backgroundVitaly Buka2019-09-121-0/+2
| | | | llvm-svn: 371705
* [compiler-rt] Remove some cpplint filtersVitaly Buka2019-09-121-5/+5
| | | | llvm-svn: 371704
* [compiler-rt] Better lint output for .inc filesVitaly Buka2019-09-121-12/+4
| | | | llvm-svn: 371702
* Remove NOLINTs from compiler-rtVitaly Buka2019-09-111-8/+8
| | | | llvm-svn: 371687
* Update compiler-rt cpplint.pyVitaly Buka2019-09-112-1047/+3276
| | | | | | https://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3 llvm-svn: 371675
* [sanitizer] Simplify COMPILER_RT setup in lint scriptVitaly Buka2019-08-281-8/+2
| | | | llvm-svn: 370277
* [compiler-rt] Add ConsumeProbability and ConsumeFloatingPoint methods to FDP.Max Moroz2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Also slightly cleaned up the comments and changed the header's extension back to `.h` as per comments on https://reviews.llvm.org/D65812. New methods added: * `ConsumeProbability` returns [0.0, 1.0] by consuming an unsigned integer value from the input data and dividing that value by the integer's max value. * `ConsumeFloatingPointInRange` returns a floating point value in the given range. Relies on `ConsumeProbability` method. This method does not have the limitation of `std::uniform_real_distribution` that requires the given range to be <= the floating point type's max. If the range is too large, this implementation will additionally call `ConsumeBool` to decide whether the result will be in the first or the second half of the range. * `ConsumeFloatingPoint` returns a floating point value in the range `[std::numeric_limits<T>::lowest(), std::numeric_limits<T>::min()]`. Tested on Linux, Mac, Windows. Reviewers: morehouse Reviewed By: morehouse Subscribers: kubamracek, mgorny, dberris, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65905 llvm-svn: 368331
* [compiler-rt] Rename FuzzedDataProvider.h to .hpp and other minor changes.Max Moroz2019-08-061-1/+1
| | | | | | | | | | | | | | | | | | Summary: .hpp makes more sense for this header as it's C++ only, plus it contains the actual implementation. Reviewers: Dor1s Reviewed By: Dor1s Subscribers: kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65812 llvm-svn: 368054
* [compiler-rt] Move FDP to include/fuzzer/FuzzedDataProvider.h for easier use.Max Moroz2019-08-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: FuzzedDataProvider is a helper class for writing fuzz targets that fuzz multple inputs simultaneously. The header is supposed to be used for fuzzing engine agnostic fuzz targets (i.e. the same target can be used with libFuzzer, AFL, honggfuzz, and other engines). The common thing though is that fuzz targets are typically compiled with clang, as it provides all sanitizers as well as different coverage instrumentation modes. Therefore, making this FDP class a part of the compiler-rt installation package would make it easier to develop and distribute fuzz targets across different projects, build systems, etc. Some context also available in https://github.com/google/oss-fuzz/pull/2547. This CL does not delete the header from `lib/fuzzer/utils` directory in order to provide the downstream users some time for a smooth migration to the new header location. Reviewers: kcc, morehouse Reviewed By: morehouse Subscribers: lebedev.ri, kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65661 llvm-svn: 367917
* compiler-rt: Rename cc files below test/asan to cppNico Weber2019-08-051-2/+2
| | | | | | See r367803 and similar other changes. llvm-svn: 367887
* compiler-rt: Rename .cc file in test/lsan to .cppFangrui Song2019-08-051-1/+1
| | | | | | Like r367463, but for test/lsan. llvm-svn: 367803
* compiler-rt: Rename .cc file in test/tsan to .cppFangrui Song2019-08-021-1/+1
| | | | | | Like r367463, but for test/tsan. llvm-svn: 367656
* compiler-rt: Rename .cc file in lib/tsan/tests/{rtl,unit} to .cppNico Weber2019-08-011-2/+2
| | | | | | Like r367463, but for tsan/tests/{rtl,unit}. llvm-svn: 367566
* compiler-rt: Rename .cc file in lib/tsan/rtl to .cppNico Weber2019-08-011-1/+1
| | | | | | Like r367463, but for tsan/rtl. llvm-svn: 367564
* compiler-rt: Rename .cc file in lib/msan to .cppNico Weber2019-08-011-1/+1
| | | | | | Like r367463, but for msan. llvm-svn: 367562
* compiler-rt: Rename .cc file in lib/lsan to .cppNico Weber2019-08-011-1/+1
| | | | | | Like r367463, but for lsan. llvm-svn: 367561
* compiler-rt: Rename .cc file in lib/asan/tests to .cppNico Weber2019-08-011-1/+1
| | | | | | Like r367463, but for asan/tests llvm-svn: 367559
* compiler-rt: Rename .cc file in lib/asan to .cppNico Weber2019-08-011-1/+1
| | | | | | Like r367463, but for asan. llvm-svn: 367558
* Try to heal bots after r367551Nico Weber2019-08-011-1/+1
| | | | llvm-svn: 367552
* Attempt to heal bots after r367467Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367473
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-311-1/+1
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* Attempt to heal bots after r367456Nico Weber2019-07-311-1/+1
| | | | llvm-svn: 367462
* [compiler-rt] Respect CMAKE_NMShoaib Meenai2019-06-151-3/+4
| | | | | | | | | | | The default nm executable may not be able to handle the architecture we're building the sanitizers for. Respect CMAKE_NM if it's set to ensure we're using the correct nm tool. Preserve the existing NM environment variable override to not break its users. Differential Revision: https://reviews.llvm.org/D63368 llvm-svn: 363483
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* sanitizer_common: Change gen_dynamic_list.py to take a -o argument instead ↵Peter Collingbourne2019-01-111-10/+13
| | | | | | | | | | | 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
* [Sanitizers] Export aligned new/delete from runtimes.Alex Shlyapnikov2017-12-231-0/+20
| | | | | | | | | | | | | | | | Summary: Export aligned new/delete to make dynamic runtimes work again. Remove all valid new/delete cases from ASan test, there's a test in common for that. Reviewers: eugenis Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41548 llvm-svn: 321394
* [sanitizer] Add Scudo to the sanitizer lint checks.Kostya Kortchinsky2017-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: Scudo abides by the coding style enforced by the sanitizer_common linter, but as of right now, it's not linter-enforced. Add Scudo to the list of directories checked by check_lint.sh. Also: fixes some linter errors found after getting this running. Reviewers: cryptoad Reviewed By: cryptoad Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39757 llvm-svn: 317699
* [asan] fix one more case where stack-use-after-return is not ↵Kostya Serebryany2017-06-021-1/+1
| | | | | | async-signal-safe (during thread startup). beef-up the test to give it a chance to catch regressions. Also relax the lint to make C++11 more usable. llvm-svn: 304598
* [sanitizer-coverage] remove stale code (old coverage); compiler-rt part Kostya Serebryany2017-05-311-1/+1
| | | | llvm-svn: 304318
* sancov.py: [Py3] Get rid of "print" statement. Use print() or write() instead.NAKAMURA Takumi2017-02-121-26/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D27405 llvm-svn: 294880
* sancov.py: [Py3] Use sys.stdout.buffer for bytes.NAKAMURA Takumi2017-02-111-2/+3
| | | | | | This is part of https://reviews.llvm.org/D27405 llvm-svn: 294812
* sancov.py: [Py3] Use bytes.decode() explicitly.NAKAMURA Takumi2017-02-071-1/+1
| | | | | | | | Or bogus filename like "b'foo'" would be generated. This is part of https://reviews.llvm.org/D27405 llvm-svn: 294307
* sancov.py: [Py3] Use '//' instead of '/' as division operator.NAKAMURA Takumi2017-02-071-3/+5
| | | | | | | | Py3 emits float with '/'. This is part of https://reviews.llvm.org/D27405 llvm-svn: 294306
* [XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris2016-09-201-1/+2
| | | | | | | | | | | | This is a port of XRay to ARM 32-bit, without Thumb support yet. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: https://reviews.llvm.org/D23931 (LLVM) https://reviews.llvm.org/D23932 (Clang test) Differential Revision: https://reviews.llvm.org/D23933 llvm-svn: 281971
* Revert "[XRay] ARM 32-bit no-Thumb support in compiler-rt"Renato Golin2016-09-081-2/+1
| | | | | | This reverts commit r280890, as the related LLVM commit broke the thumb bots. llvm-svn: 280969
* [XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris2016-09-081-1/+2
| | | | | | | | | | | | | This is a port of XRay to ARM 32-bit, without Thumb support yet. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: 1. https://reviews.llvm.org/D23931 (LLVM) 2. https://reviews.llvm.org/D23932 (Clang test) Differential Revision: https://reviews.llvm.org/D23933 llvm-svn: 280890
* [compiler-rt] Allow nm program to be over-ridden for global symbol detectionFrancis Ricci2016-08-101-2/+3
| | | | | | | | | | | | | | Summary: While cross-compiling, a custom nm program may be required. This will also allow for the use of llvm-nm if desired. Reviewers: samsonov, beanz, compnerd, eugenis Subscribers: kubabrecka, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D23278 llvm-svn: 278187
* [ASAN] Use struct instead of array in sancov.pySagar Thakur2016-04-221-8/+13
| | | | | | | | | | | | Summary: When using 32-bit python with 64-bit asan the pc array in sancov.py cannot fit in 64-bit pc's because the type-code 'L' for arrays in python corresponds to the C type long which is only of 4 bytes. Because of this some of the coverage tool tests fail on mips. To fix these test possible solutions are to use 64-bit python or use struct.unpack with the 'Q' type-code. We have used struct.unpack with 'Q' type code since it is not appropriate to have a 64-bit python on all hosts. Reviewed by kcc, aizatsky Differential: http://reviews.llvm.org/D18817 llvm-svn: 267126
* [asan] Tweak gen_dynamic_list.py to work with both Py2 and Py3.Evgeniy Stepanov2015-10-011-1/+1
| | | | llvm-svn: 249051
* [asan] Add new(unsigned int) to ASan interface list.Evgeniy Stepanov2015-05-281-5/+12
| | | | | | | | | Also, sized-delete with size_t == unsigned int. These guys appear when building for Android with gnu-stl. Fixes a number of ASan tests in that particular configuration. llvm-svn: 238484
* Use /usr/bin/env to find pythonEd Maste2015-05-282-2/+2
| | | | | | | | | | Python may not be /usr/bin/python on some systems. For example, on FreeBSD it will be /usr/local/bin/python. Reviewers: samsonov Differential Revision: http://reviews.llvm.org/D9914 llvm-svn: 238428
* [sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().Sergey Matveev2015-05-121-1/+5
| | | | llvm-svn: 237149
* [sanitizer] Extend sancov.py to show which PCs are missing from coverage.Sergey Matveev2015-05-061-4/+41
| | | | | | | | Example usage: sancov.py print a.out.1234.sancov | sancov.py missing a.out llvm-svn: 236637
* [asan] Fix dynamic-runtime tests.Evgeniy Stepanov2015-05-061-2/+3
| | | | | | | | | | They are not part of check-all :( This change adds sized-delete operators to the version list, and disables the hack that excluded versioned symbols from the dynamic list - this is not an issue in this case. llvm-svn: 236559
* [asan] Use a version script to limit the symbols exported by the ASan shared ↵Evgeniy Stepanov2015-05-051-4/+17
| | | | | | runtime library. llvm-svn: 236551
* [Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shellTimur Iskhodzhanov2015-04-011-6/+13
| | | | | | Reviewed at http://reviews.llvm.org/D8724 llvm-svn: 233809
* [PowerPC]Fix sancov.py to once again support big endianBill Seurer2015-03-251-9/+9
| | | | | | | | Some recent changes to sancov.py broke ASAN for big endian. This fixes it. http://reviews.llvm.org/D8594 llvm-svn: 233189
OpenPOWER on IntegriCloud