#
0b94e880 |
| 12-Oct-2018 |
Jonathan Metzman <metzman@chromium.org> |
[SanitizerCoverage] Prevent /OPT:REF from stripping constructors
Summary: Linking with the /OPT:REF linker flag when building COFF files causes the linker to strip SanitizerCoverage's constructors.
[SanitizerCoverage] Prevent /OPT:REF from stripping constructors
Summary: Linking with the /OPT:REF linker flag when building COFF files causes the linker to strip SanitizerCoverage's constructors. Prevent this by giving the constructors WeakODR linkage and by passing the linker a directive to include sancov.module_ctor.
Include a test in compiler-rt to verify libFuzzer can be linked using /OPT:REF
Reviewers: morehouse, rnk
Reviewed By: morehouse, rnk
Subscribers: rnk, morehouse, hiraditya
Differential Revision: https://reviews.llvm.org/D52119
llvm-svn: 344391
show more ...
|
#
4d010ca3 |
| 12-Oct-2018 |
Max Moroz <mmoroz@chromium.org> |
[SanitizerCoverage] Make Inline8bit and TracePC counters dead stripping resistant.
Summary: Otherwise, at least on Mac, the linker eliminates unused symbols which causes libFuzzer to error out due t
[SanitizerCoverage] Make Inline8bit and TracePC counters dead stripping resistant.
Summary: Otherwise, at least on Mac, the linker eliminates unused symbols which causes libFuzzer to error out due to a mismatch of the sizes of coverage tables.
Issue in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=892167
Reviewers: morehouse, kcc, george.karpenkov
Reviewed By: morehouse
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D53113
llvm-svn: 344345
show more ...
|
Revision tags: llvmorg-7.0.0 |
|
#
3bea25e5 |
| 13-Sep-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they reference, even on the BFD linker.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D51902
llvm-svn: 342186
show more ...
|
#
f0d7daa9 |
| 11-Sep-2018 |
Matt Morehouse <mascasa@google.com> |
Revert "[SanitizerCoverage] Create comdat for global arrays."
This reverts r341987 since it will cause trouble when there's a module ID collision.
llvm-svn: 341995
|
#
7ce60324 |
| 11-Sep-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they reference, even on the BFD linker.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D51902
llvm-svn: 341987
show more ...
|
#
40fbdd0c |
| 11-Sep-2018 |
Matt Morehouse <mascasa@google.com> |
Revert "[SanitizerCoverage] Create comdat for global arrays."
This reverts r341951 due to bot breakage.
llvm-svn: 341965
|
#
eac270ca |
| 11-Sep-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they
[SanitizerCoverage] Create comdat for global arrays.
Summary: Place global arrays in comdat sections with their associated functions. This makes sure they are stripped along with the functions they reference, even on the BFD linker.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D51902
llvm-svn: 341951
show more ...
|
Revision tags: llvmorg-7.0.0-rc3 |
|
#
7e042bb1 |
| 30-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It a
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them.
Patch By: metzman
Reviewers: morehouse, rnk
Reviewed By: morehouse, rnk
Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman
Differential Revision: https://reviews.llvm.org/D51022
llvm-svn: 341082
show more ...
|
#
cf311cfc |
| 29-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
Revert "[libFuzzer] Port to Windows"
This reverts r340949 due to bot breakage again.
llvm-svn: 340954
|
#
245ebd71 |
| 29-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It a
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them.
Reviewers: morehouse, rnk
Reviewed By: morehouse, rnk
Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman
Differential Revision: https://reviews.llvm.org/D51022
llvm-svn: 340949
show more ...
|
#
bab8556f |
| 28-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
Revert "[libFuzzer] Port to Windows"
This reverts commit r340860 due to failing tests.
llvm-svn: 340867
|
#
c6fff3b6 |
| 28-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It a
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them.
Patch By: metzman
Reviewers: morehouse, rnk
Reviewed By: morehouse, rnk
Subscribers: morehouse, kcc, eraman
Differential Revision: https://reviews.llvm.org/D51022
llvm-svn: 340860
show more ...
|
Revision tags: llvmorg-7.0.0-rc2 |
|
#
0f22fac2 |
| 14-Aug-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Add associated metadata to PC guards.
Summary: Without this metadata LLD strips unused PC table entries but won't strip unused guards. This metadata also seems to influence the
[SanitizerCoverage] Add associated metadata to PC guards.
Summary: Without this metadata LLD strips unused PC table entries but won't strip unused guards. This metadata also seems to influence the linker to change the ordering in the PC guard section to match that of the PC table section.
The libFuzzer runtime library depends on the ordering of the PC table and PC guard sections being the same. This is not generally guaranteed, so we may need to redesign PC tables/guards/counters in the future.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: kcc, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D50483
llvm-svn: 339733
show more ...
|
Revision tags: llvmorg-7.0.0-rc1 |
|
#
45438161 |
| 12-Jul-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Add associated metadata to 8-bit counters.
Summary: This allows counters associated with unused functions to be dead-stripped along with their functions. This approach is the sa
[SanitizerCoverage] Add associated metadata to 8-bit counters.
Summary: This allows counters associated with unused functions to be dead-stripped along with their functions. This approach is the same one we used for PC tables.
Fixes an issue where LLD removes an unused PC table but leaves the 8-bit counter.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: llvm-commits, hiraditya, kcc
Differential Revision: https://reviews.llvm.org/D49264
llvm-svn: 336941
show more ...
|
#
16497748 |
| 25-Jun-2018 |
Benjamin Kramer <benny.kra@googlemail.com> |
[Instrumentation] Remove unused include
It's also a layering violation.
llvm-svn: 335528
|
#
0ea9a90b |
| 15-Jun-2018 |
Matt Morehouse <mascasa@google.com> |
[SanitizerCoverage] Add associated metadata to pc-tables.
Summary: Using associated metadata rather than llvm.used allows linkers to perform dead stripping with -fsanitize-coverage=pc-table. Unfort
[SanitizerCoverage] Add associated metadata to pc-tables.
Summary: Using associated metadata rather than llvm.used allows linkers to perform dead stripping with -fsanitize-coverage=pc-table. Unfortunately in my local tests, LLD was the only linker that made use of this metadata.
Partially addresses https://bugs.llvm.org/show_bug.cgi?id=34636 and fixes https://github.com/google/sanitizers/issues/971.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: Dor1s, hiraditya, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D48203
llvm-svn: 334858
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
a2759327 |
| 11-May-2018 |
Kostya Serebryany <kcc@google.com> |
[sanitizer-coverage] don't instrument a function if it's entry block ends with 'unreachable'
llvm-svn: 332072
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
636d94db |
| 13-Apr-2018 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
[Transforms] Change std::sort to llvm::sort in response to r327219
Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-
[Transforms] Change std::sort to llvm::sort in response to r327219
Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches.
Reviewers: kcc, pcc, danielcdh, jmolloy, sanjoy, dberlin, ruiu
Reviewed By: ruiu
Subscribers: ruiu, llvm-commits
Differential Revision: https://reviews.llvm.org/D45142
llvm-svn: 330059
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
4192b963 |
| 09-Sep-2017 |
Kostya Serebryany <kcc@google.com> |
[sanitizer-coverage] call appendToUsed once per module, not once per function (which is too slow)
llvm-svn: 312855
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5 |
|
#
034126e5 |
| 30-Aug-2017 |
Matt Morehouse <mascasa@google.com> |
[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and Fuzzer
[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Only enable on Linux.
Reviewers: vitalybuka, kcc, george.karpenkov
Reviewed By: kcc
Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D37156
llvm-svn: 312185
show more ...
|
#
ba2e61b3 |
| 29-Aug-2017 |
Matt Morehouse <mascasa@google.com> |
Revert "[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer"
This reverts r312026 due to bot breakage.
llvm-svn: 312047
|
Revision tags: llvmorg-5.0.0-rc4 |
|
#
2ad8d948 |
| 29-Aug-2017 |
Matt Morehouse <mascasa@google.com> |
[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and Fuzzer
[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Disable stack depth tracking on Mac.
Reviewers: vitalybuka, kcc, george.karpenkov
Reviewed By: kcc
Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D37156
llvm-svn: 312026
show more ...
|
#
f1a54a47 |
| 29-Aug-2017 |
Justin Bogner <mail@justinbogner.com> |
[sanitizer-coverage] Mark the guard and 8-bit counter arrays as used
In r311742 we marked the PCs array as used so it wouldn't be dead stripped, but left the guard and 8-bit counters arrays alone si
[sanitizer-coverage] Mark the guard and 8-bit counter arrays as used
In r311742 we marked the PCs array as used so it wouldn't be dead stripped, but left the guard and 8-bit counters arrays alone since these are referenced by the coverage instrumentation. This doesn't quite work if we want the indices of the PCs array to match the other arrays though, since elements can still end up being dead and disappear.
Instead, we mark all three of these arrays as used so that they'll be consistent with one another.
llvm-svn: 311959
show more ...
|
#
873a0746 |
| 28-Aug-2017 |
Justin Bogner <mail@justinbogner.com> |
[sanitizer-coverage] Return the array from CreatePCArray. NFC
Be more consistent with CreateFunctionLocalArrayInSection in the API of CreatePCArray, and assign the member variable in the caller like
[sanitizer-coverage] Return the array from CreatePCArray. NFC
Be more consistent with CreateFunctionLocalArrayInSection in the API of CreatePCArray, and assign the member variable in the caller like we do for the guard and 8-bit counter arrays.
This also tweaks the order of method declarations to match the order of definitions in the file.
llvm-svn: 311955
show more ...
|
#
be757de2 |
| 28-Aug-2017 |
Justin Bogner <mail@justinbogner.com> |
[sanitizer-coverage] Clean up trailing whitespace. NFC
llvm-svn: 311954
|