summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/scripts
AgeCommit message (Collapse)Author
2017-11-08[sanitizer] Add Scudo to the sanitizer lint checks.Kostya Kortchinsky
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02[asan] fix one more case where stack-use-after-return is not ↵Kostya Serebryany
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304598 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[sanitizer-coverage] remove stale code (old coverage); compiler-rt part Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304318 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12sancov.py: [Py3] Get rid of "print" statement. Use print() or write() instead.NAKAMURA Takumi
Differential Revision: https://reviews.llvm.org/D27405 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294880 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11sancov.py: [Py3] Use sys.stdout.buffer for bytes.NAKAMURA Takumi
This is part of https://reviews.llvm.org/D27405 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294812 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07sancov.py: [Py3] Use bytes.decode() explicitly.NAKAMURA Takumi
Or bogus filename like "b'foo'" would be generated. This is part of https://reviews.llvm.org/D27405 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294307 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-07sancov.py: [Py3] Use '//' instead of '/' as division operator.NAKAMURA Takumi
Py3 emits float with '/'. This is part of https://reviews.llvm.org/D27405 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-20[XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-08Revert "[XRay] ARM 32-bit no-Thumb support in compiler-rt"Renato Golin
This reverts commit r280890, as the related LLVM commit broke the thumb bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-08[XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-10[compiler-rt] Allow nm program to be over-ridden for global symbol detectionFrancis Ricci
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22[ASAN] Use struct instead of array in sancov.pySagar Thakur
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-01[asan] Tweak gen_dynamic_list.py to work with both Py2 and Py3.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28[asan] Add new(unsigned int) to ASan interface list.Evgeniy Stepanov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238484 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28Use /usr/bin/env to find pythonEd Maste
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238428 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12[sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237149 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06[sanitizer] Extend sancov.py to show which PCs are missing from coverage.Sergey Matveev
Example usage: sancov.py print a.out.1234.sancov | sancov.py missing a.out git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236637 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-06[asan] Fix dynamic-runtime tests.Evgeniy Stepanov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236559 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-05[asan] Use a version script to limit the symbols exported by the ASan shared ↵Evgeniy Stepanov
runtime library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01[Sanitizers Coverage] Make sancov.py work with wildcards from Windows CMD shellTimur Iskhodzhanov
Reviewed at http://reviews.llvm.org/D8724 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25[PowerPC]Fix sancov.py to once again support big endianBill Seurer
Some recent changes to sancov.py broke ASAN for big endian. This fixes it. http://reviews.llvm.org/D8594 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233189 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-19[sanitizer] fix 'sancov.py merge' and add a test for itKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-19[sanitizer] trying to fix sancov.py with 32-bit pythonKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232754 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-18[sanitizer] change the sanitizer coverage format once again, this time ↵Kostya Serebryany
adding a magic to the beginning of the file git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232679 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-18[sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are ↵Kostya Serebryany
dumped in the order of their appearance git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232573 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17[sanitizer] change the format of coverage dump: instead of always dumping ↵Kostya Serebryany
32-bit offsets dump 32-bit offsets on 32-bit arch and 64-bit offsets on 64-bit arch. Also add the 'bits' parameter to sancov.py. This is a user-visible interface change. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04Exclude LLVM sources from lint check.Alexey Samsonov
Checking files from different repository is not nice, and LLVM code follows its own style guide anyway. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231289 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16[sanitizer] Fix bashism in check_lint.sh.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16[sanitizer] Cleanup linter temporary files.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226266 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-25[sanitizer] Tweak sancov.py output.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224841 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-25[sanitizer] sancov.py: print status to stderrEvgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224840 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08Custom wrappers for DFSanitizing sprintf & snprintf.Lorenzo Martignoni
Differential Revision: http://reviews.llvm.org/D5561 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219293 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-07Avoid bashisms and switch to /bin/shEd Maste
Bash may not be installed on some systems by default, like FreeBSD. Differential Revision: http://reviews.llvm.org/D5654 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219231 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21Adjust gen_dynamic_list for PowerPC function descriptorsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213577 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-09Don't check lint for SpecialCaseList.cppAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212642 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-03[sancov] Handle spaces in module name.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210108 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-02[sancov] Remove debug leftovers and update usage text.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210009 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-27[asancov] Write coverage directly to a memory-mapped file.Evgeniy Stepanov
This way does not require a __sanitizer_cov_dump() call. That's important on Android, where apps can be killed at arbitrary time. We write raw PCs to disk instead of module offsets; we also write memory layout to a separate file. This increases dump size by the factor of 2 on 64-bit systems. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209653 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19[sanitizer] Support sandboxing in sanitizer coverage.Sergey Matveev
Summary: Sandboxed code may now pass additional arguments to __sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a single file (the default is one file per module). The user may supply a file or socket to write to. The latter option can be used to broker out the file writing functionality. If -1 is passed, we pre-open a file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-15cleanup and test litlintGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208907 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-15Fix typosAlp Toker
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208841 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14migrate litlint from argparse to optparse. reenabledGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208826 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14Disabled litlint. It requires Python 2.7 or laterGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208823 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14add script to ensure lit test contains %runGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21fixed check_lint.sh in standalone buildGreg Fitzgerald
Change-Id: I30d340bbe6b2028cc0f831399b62521912dcac60 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204419 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25Update sanitizers' bash scripts.Alexey Samsonov
* Fix bash scripts to work on FreeBSD (patch by Viktor Kutuzov) * Update locations of lit tests in check_lint script. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202145 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31[sanitizer] Support most ioctls from /usr/include/sound/.Sergey Matveev
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Fix gen_dynamic_list.py for Python 3. Patch by Marcoen Hirschberg.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26Implement a bunch of custom glibc wrappers & corresponding testsLorenzo Martignoni
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding ↵Peter Collingbourne
tests." It broke a buildbot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195392 91177308-0d34-0410-b5e6-96231b3b80d8