tools/libFuzzer.git
7 years agoAdd 'Total coverage' row to index page of coverage report 38/153538/1
Dmitriy Nikiforov [Thu, 28 Sep 2017 17:46:04 +0000 (20:46 +0300)]
Add 'Total coverage' row to index page of coverage report

Change-Id: I91bf226b4544a5c25b37f1afa80153b0684225d8

7 years agoAdd capability to ignore *.h and *.hpp in coverage report 18/144618/5 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20170828.223016 accepted/tizen/unified/20170822.113011 submit/tizen/20170821.165212 submit/tizen_4.0/20170828.100009 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
Dmitry Kovalenko [Thu, 17 Aug 2017 08:26:01 +0000 (11:26 +0300)]
Add capability to ignore *.h and *.hpp in coverage report

--exclude-headers enable excluding all headers
--exclude-headers <path> exclude all headers from this path

Change-Id: Ia1749272af3bbc58bc25d8b4102bd264bc5ad451
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
7 years agoAdd additional linker options to fuzz-force-options package 25/144425/1
Dmitriy Nikiforov [Wed, 16 Aug 2017 14:50:20 +0000 (17:50 +0300)]
Add additional linker options to fuzz-force-options package

Needed to avoid some linkage problems when using ASan.

Change-Id: I2b739cb6e89a1815dd7fd8baead8c234054142d0

7 years agoAdd merge_symcov.py script to sancov package 96/143796/1 Protex-check-17082017 accepted/tizen/unified/20170816.053858 submit/tizen/20170811.142451
Dmitry Kovalenko [Fri, 11 Aug 2017 09:14:14 +0000 (12:14 +0300)]
Add merge_symcov.py script to sancov package

Change-Id: I81eee3a9f0288b98a7287c004d82623f128ec518

7 years agoAdd script for merging several symcov's 97/142297/1
Dmitry Kovalenko [Thu, 3 Aug 2017 09:36:44 +0000 (12:36 +0300)]
Add script for merging several symcov's

Change-Id: I1c93206f6d1ac5dc9203931fe8053014a1af7b64
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
7 years agoUse asan-force-options package from gcc 59/140959/2 accepted/tizen/4.0/unified/20170816.014806 accepted/tizen/unified/20170728.195738 submit/tizen/20170727.132855 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
Maria Guseva [Thu, 27 Jul 2017 08:21:23 +0000 (11:21 +0300)]
Use asan-force-options package from gcc

Avoid gcc-force/unforce-options scripts duplications in linaro-gcc and
libFuzzer projects.

Change-Id: I983d1375669bff772f294c27b5c3f281a264a0bc

7 years agoFix "UnicodeDecodeError: 'ascii' codec can't decode" in coverage-report-dump.py 38/139438/2
Maria Guseva [Wed, 19 Jul 2017 03:26:18 +0000 (12:26 +0900)]
Fix "UnicodeDecodeError: 'ascii' codec can't decode" in coverage-report-dump.py

Change-Id: Ibaaf285d94ce5ade302983b16b787e55d3c46811

7 years ago[libFuzzer] change the default max_len from 64 to 4096. This will affect cases where... 38/139038/1 accepted/tizen/unified/20170718.174118 submit/tizen/20170717.082441
Kostya Serebryany [Thu, 15 Jun 2017 22:43:40 +0000 (22:43 +0000)]
[libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items.

Change-Id: Ia396f702ec7c8a0c637837240282f85574e1af3a
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305521 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFixing section name for Darwin platforms for sanitizer coverage 37/139037/1
George Karpenkov [Wed, 14 Jun 2017 23:40:25 +0000 (23:40 +0000)]
Fixing section name for Darwin platforms for sanitizer coverage

On Darwin, section names have a 16char length limit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305429 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I2886b0de1efdbf69030ec5c92cde0f261c4273f3

7 years ago[libFuzzer] really restrict the new test to Linux (fails on Mac/Windows currently) 36/139036/1
Kostya Serebryany [Wed, 14 Jun 2017 00:34:42 +0000 (00:34 +0000)]
[libFuzzer] really restrict the new test to Linux (fails on Mac/Windows currently)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305346 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I01cd187c1304e273e6af8c980ef073ae5661ec83

7 years ago[libFuzzer] restrict the new test to Linux (fails on Mac currently) 35/139035/1
Kostya Serebryany [Tue, 13 Jun 2017 23:09:11 +0000 (23:09 +0000)]
[libFuzzer] restrict the new test to Linux (fails on Mac currently)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305335 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I09edcc67874aa185209875f0de9f0ce44501c458

7 years ago[libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer... 34/139034/1
Kostya Serebryany [Tue, 13 Jun 2017 22:31:21 +0000 (22:31 +0000)]
[libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer. This is not fully functional yet, but simple tests work

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305331 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I35ec0f5a73a20a1d9650a3384049c25f24bc4be9

7 years agoFix missed debuginfo in libFuzzer binary 69/138869/1
Maria Guseva [Fri, 14 Jul 2017 05:08:09 +0000 (14:08 +0900)]
Fix missed debuginfo in libFuzzer binary

Disable stripping debuginfo for libFuzzer.

Change-Id: Id7dc47720b081869fef560dbf45783a6cbafc091

7 years agoAdd capability to dump coverage instead of http server run
Dmitry Kovalenko [Mon, 10 Jul 2017 09:33:09 +0000 (12:33 +0300)]
Add capability to dump coverage instead of http server run

Use coverage-report-dump.py with --dump=<dest_dir> to dump html's

"$BROWSER <dest_dir>/index.html" show same info as common HTTP server
but now you can easily share coverage

Moreover makes zip archive with whole report and print to stdout summary

Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
7 years agoGet debug filename using Build-ID or .gnu_debuglink section
Dmitry Kovalenko [Mon, 10 Jul 2017 05:02:44 +0000 (08:02 +0300)]
Get debug filename using Build-ID or .gnu_debuglink section

Use readelf output to obtain debug filename

7 years agoFix regexp in sancov_symbolize.py
Dmitriy Nikiforov [Wed, 12 Jul 2017 08:10:17 +0000 (17:10 +0900)]
Fix regexp in sancov_symbolize.py

Before this patch this regexp did not work with C++ code.

7 years agoAdd license file 74/138474/1 accepted/tizen/unified/20170717.021128 submit/tizen/20170714.013956
Maria Guseva [Tue, 11 Jul 2017 07:47:36 +0000 (16:47 +0900)]
Add license file

Change-Id: Ia0a86e55a90e7eaa50462a15fdac4f38db3d620b

7 years agoFix coverage-report-server.py script to work with absolute srcpath master
Maria Guseva [Thu, 6 Jul 2017 11:23:53 +0000 (14:23 +0300)]
Fix coverage-report-server.py script to work with absolute srcpath

The issue is due to os.path.join semantics:

If a component is an absolute path, all previous components are thrown away
and joining continues from the absolute path component.

7 years agoAdd upstream LLVM coverage-report-server.py script for sancov dumps visualization
Maria Guseva [Thu, 6 Jul 2017 10:58:36 +0000 (13:58 +0300)]
Add upstream LLVM coverage-report-server.py script for sancov dumps visualization

7 years agoRemove the libsancov_cb hack
Maria Guseva [Wed, 5 Jul 2017 08:51:45 +0000 (11:51 +0300)]
Remove the libsancov_cb hack

Removed as the __sanitizer_cov_trace_pc stub is available now in GCC
for Tizen 4.0 (Tizen:Base).

7 years agoRevert "Add removing of the -Wl,-Bsymbolic options in gcc-force-options script"
Maria Guseva [Wed, 5 Jul 2017 08:45:03 +0000 (11:45 +0300)]
Revert "Add removing of the -Wl,-Bsymbolic options in gcc-force-options script"

This reverts commit 76f20263d005bcb2db00dedbb4e1429a95e6a486.
Reverted as the libsancov_cb hack was removed in previous commit.

7 years agoAdd build of sancov.rpm package to deliver scripts for coverage processing
Maria Guseva [Wed, 5 Jul 2017 08:27:05 +0000 (11:27 +0300)]
Add build of sancov.rpm package to deliver scripts for coverage processing

7 years agoAdd Google code style configuration for pylint
Dmitriy Nikiforov [Wed, 5 Jul 2017 08:26:53 +0000 (11:26 +0300)]
Add Google code style configuration for pylint

link: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/master/pylintrc
7 years agoAdd '--debug-dirs' option to sancov_symbolize.py
Dmitriy Nikiforov [Fri, 9 Jun 2017 16:27:28 +0000 (19:27 +0300)]
Add '--debug-dirs' option to sancov_symbolize.py

Added '--debug-dirs' for specifying paths to directories with .debug files
containing debug information for specified binaries.

Changes:
  - Moved arguments parsing logic to a new function 'parse_args'
  - print_symcov() now accepts list of tuples as its argument instead of a dict
  - Added 'debug_info' argument to get_symbolized_coverage()
  - Updated usage message

7 years agoFix regexp expressions in sancov.py to work with old grep on Tizen
Maria Guseva [Fri, 9 Jun 2017 09:47:36 +0000 (12:47 +0300)]
Fix regexp expressions in sancov.py to work with old grep on Tizen

Grep is known to treat "\s" differently:
only in newer versions it is intrepreted as whitespace.
See http://savannah.gnu.org/bugs/?30515 for details

On Tizen the grep verions is 2.5.2 and "\s" is not yet supported as a special
symbol there.

7 years agoAdd support for __sanitizer_cov_trace_pc to sancov.py
Dmitriy Nikiforov [Thu, 8 Jun 2017 12:07:26 +0000 (15:07 +0300)]
Add support for __sanitizer_cov_trace_pc to sancov.py

7 years agoAdd upstream LLVM sancov.py script for sancov dumps parsing
Dmitriy Nikiforov [Thu, 8 Jun 2017 12:06:15 +0000 (15:06 +0300)]
Add upstream LLVM sancov.py script for sancov dumps parsing

7 years ago[sanitizer-coverage] Add script for coverage symbolization
Dmitriy Nikiforov [Wed, 7 Jun 2017 17:54:21 +0000 (20:54 +0300)]
[sanitizer-coverage] Add script for coverage symbolization

7 years agoFix the includes in lib/Fuzzer on Windows that have ordering
Chandler Carruth [Tue, 6 Jun 2017 23:28:01 +0000 (23:28 +0000)]
Fix the includes in lib/Fuzzer on Windows that have ordering
dependencies and add comments to tell future maintainers about those
requirements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304843 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort the remaining #include lines in include/... and lib/....
Chandler Carruth [Tue, 6 Jun 2017 11:49:48 +0000 (11:49 +0000)]
Sort the remaining #include lines in include/... and lib/....

I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line with a #include and let it re-sort things according to the precise
LLVM rules for include ordering baked into clang-format these days.

I've reverted a number of files where the results of sorting includes
isn't healthy. Either places where we have legacy code relying on
particular include ordering (where possible, I'll fix these separately)
or where we have particular formatting around #include lines that
I didn't want to disturb in this patch.

This patch is *entirely* mechanical. If you get merge conflicts or
anything, just ignore the changes in this patch and run clang-format
over your #include lines in the files.

Sorry for any noise here, but it is important to keep these things
stable. I was seeing an increasing number of patches with irrelevant
re-ordering of #include lines because clang-format was used. This patch
at least isolates that churn, makes it easy to skip when resolving
conflicts, and gets us to a clean baseline (again).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304787 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm] Remove double semicolons
Mandeep Singh Grang [Tue, 6 Jun 2017 05:08:36 +0000 (05:08 +0000)]
[llvm] Remove double semicolons

Reviewers: craig.topper, arsenm, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: mehdi_amini, wdng, nhaehnle, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D33924

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304767 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix a test to match the new sanitizer run-time
Kostya Serebryany [Wed, 31 May 2017 19:47:11 +0000 (19:47 +0000)]
[libFuzzer] fix a test to match the new sanitizer run-time

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304333 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] Don't replace custom signal handlers.
Vitaly Buka [Thu, 25 May 2017 01:43:13 +0000 (01:43 +0000)]
[libFuzzer] Don't replace custom signal handlers.

Summary:
This allows to keep handlers installed by sanitizers.
In other cases third-party code can replace handlers after libFuzzer
initialization anyway.

Reviewers: kcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33522

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303828 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix tests on Windows
Kostya Serebryany [Mon, 15 May 2017 22:55:00 +0000 (22:55 +0000)]
[libFuzzer] fix tests on Windows

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303128 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] improve the afl driver and it's tests. Make it possible to run individual...
Kostya Serebryany [Mon, 15 May 2017 22:38:29 +0000 (22:38 +0000)]
[libFuzzer] improve the afl driver and it's tests. Make it possible to run individual inputs with afl driver

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303125 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian...
Kostya Serebryany [Mon, 15 May 2017 17:39:42 +0000 (17:39 +0000)]
[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian Holler. This also fixes a logical bug, which however does not affect the libFuzzer's ability too much (I wasn't able to create a differentiating test)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303087 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix a compiler warning
Kostya Serebryany [Wed, 10 May 2017 23:59:03 +0000 (23:59 +0000)]
[libFuzzer] fix a compiler warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302747 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd TODO comments to remove the libsancov_cb hack
Maria Guseva [Thu, 1 Jun 2017 11:34:57 +0000 (14:34 +0300)]
Add TODO comments to remove the libsancov_cb hack

7 years agoAdd removing of the -Wl,-Bsymbolic options in gcc-force-options script
Maria Guseva [Fri, 5 May 2017 15:14:58 +0000 (18:14 +0300)]
Add removing of the -Wl,-Bsymbolic options in gcc-force-options script

7 years agoIntroduce fuzz-force-options package
Maria Guseva [Fri, 5 May 2017 16:04:28 +0000 (19:04 +0300)]
Introduce fuzz-force-options package

The packages forces compile options for Address Sanitization and coverage
needed for fuzzing.

7 years agoAdd building dummy lib for SanCov
Maria Guseva [Wed, 10 May 2017 06:44:24 +0000 (09:44 +0300)]
Add building dummy lib for SanCov

7 years agoAdd manifest and spec files needed for GBS build
Maria Guseva [Tue, 2 May 2017 16:13:41 +0000 (19:13 +0300)]
Add manifest and spec files needed for GBS build

7 years agoInitial commit
Maria Guseva [Wed, 10 May 2017 12:01:57 +0000 (15:01 +0300)]
Initial commit

Copied lib/Fuzzer sources from LLVM repo, master branch, rev:

    commit 1df940a102a8bf84dd51df273fa21f438ec83005
    Author: Mikael Holmen <mikael.holmen@ericsson.com>
    Date:   Wed May 10 06:33:43 2017 +0000

    [UnreachableBlockElim] Check return value of constrainRegClass().

    Summary:
    MachineRegisterInfo::constrainRegClass() can fail if two register classes
    don't have a common subclass or if the register class doesn't contain
    enough registers. Check the return value before trying to remove Phi nodes,
    and if we can't constrain, we output a COPY instead of simply replacing
    registers.

    Reviewers: kparzysz, david2050, wmi

    Reviewed By: kparzysz

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D32999

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302622 91177308-0d34-0410-b5e6-96231b3b80

7 years agoInitial empty repository
Tizen Infrastructure [Fri, 7 Jul 2017 02:18:59 +0000 (02:18 +0000)]
Initial empty repository