1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

152 Commits

Author SHA1 Message Date
Kostya Serebryany
d2117b7607 [libFuzzer] don't reload the corpus more than once every second
llvm-svn: 254824
2015-12-05 02:09:22 +00:00
Kostya Serebryany
a69b412cc5 [libFuzzer] compute base64 in-process instead of using an external lib. Since libFuzzer should not depend on anything, just re-implement base64 encoder. PR25746
llvm-svn: 254784
2015-12-04 22:29:39 +00:00
Mike Aizatsky
2444b7e49b Libfuzzer: do not pass null into user function
Differential Revision: http://reviews.llvm.org/D15098

llvm-svn: 254558
2015-12-02 22:43:53 +00:00
Kostya Serebryany
6b2a558b5e [libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb
llvm-svn: 254484
2015-12-02 02:49:37 +00:00
Kostya Serebryany
4b6eeeca4b [libFuzzer] add a flag -exact_artifact_path
llvm-svn: 254100
2015-11-25 21:40:46 +00:00
Kostya Serebryany
41c09f4dbc [libFuzzer] don't crash when reporting a leak in test_single_input mode
llvm-svn: 253761
2015-11-21 03:46:43 +00:00
Kostya Serebryany
3250d874fb [libFuzzer] remove default initializer as a workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68399. Don't need it anyway.
llvm-svn: 253419
2015-11-18 01:08:30 +00:00
Kostya Serebryany
2f218614e9 [libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer headers
llvm-svn: 253003
2015-11-13 01:54:40 +00:00
Mike Aizatsky
4afb4aff05 output_csv libfuzzer option
Summary:
The option outputs statistics in CSV format preceded by 1 header line.
This is intended for machine processing of the output.
-verbosity=0 should likely be set.

Differential Revision: http://reviews.llvm.org/D14600

llvm-svn: 252856
2015-11-12 04:38:40 +00:00
Kostya Serebryany
745d4188ac [libFuzzer] experimental flag -drill (another search heuristic; Mike Aizatsky's idea)
llvm-svn: 252838
2015-11-12 01:02:01 +00:00
Kostya Serebryany
53bfef8ad6 [libFuzzer] add UninstrumentedTest.cpp (missing from a previous commit)
llvm-svn: 252658
2015-11-10 22:02:56 +00:00
Kostya Serebryany
548bb85f31 [libFuzzer] make libFuzzer link if there is no sanitizer coverage instrumentation (it will fail at start-up time)
llvm-svn: 252533
2015-11-09 23:17:45 +00:00
Kostya Serebryany
23d6a0a60f [libFuzzer] print a bit fewer lines
llvm-svn: 252123
2015-11-05 01:19:42 +00:00
Kostya Serebryany
9d859680b2 [libFuzzer] when choosing the next unit to mutate, give some preference to the most recent units (they are more likely to be interesting)
llvm-svn: 252097
2015-11-04 23:22:25 +00:00
Kostya Serebryany
6ba411ce7a [libFuzzer] make -test_single_input more reliable: make sure the input's size is equal to it's capacity
llvm-svn: 251961
2015-11-03 18:57:25 +00:00
Kostya Serebryany
c171514e30 [libFuzzer] add -merge flag to merge corpora
llvm-svn: 251168
2015-10-24 01:16:40 +00:00
Kostya Serebryany
f03686178a [libFuzzer] remove some old code; also make __sanitizer_get_total_unique_caller_callee_pairs weak so that newer libFuzzer works with older asan
llvm-svn: 251133
2015-10-23 18:37:58 +00:00
Kostya Serebryany
829e28a729 [libFuzzer] use the indirect caller-callee counter as an independent search heuristic
llvm-svn: 251078
2015-10-22 23:55:39 +00:00
Kostya Serebryany
8c8cba5fa8 [libFuzzer] more refactoring the code that checks the coverage. NFC
llvm-svn: 251075
2015-10-22 22:56:45 +00:00
Kostya Serebryany
e6c24f1866 [libFuzzer] refactoring the code that checks the coverage. NFC
llvm-svn: 251074
2015-10-22 22:50:47 +00:00
Kostya Serebryany
99fe4b430c [libFuzzer] remove the deprecated 'tokens' feature
llvm-svn: 251069
2015-10-22 21:48:09 +00:00
Craig Topper
c8409f4435 Make a bunch of static arrays const.
llvm-svn: 250642
2015-10-18 05:15:34 +00:00
Kostya Serebryany
b30ba817ce [libFuzzer] add -shuffle flag
llvm-svn: 250603
2015-10-17 04:38:26 +00:00
Kostya Serebryany
a51be6eaa4 [libFuzzer] print a stack trace on timeout
llvm-svn: 250571
2015-10-16 23:04:31 +00:00
Kostya Serebryany
c1fcef367b [libFuzzer] reduce the size of artifacts printed on the screen
llvm-svn: 250565
2015-10-16 22:47:20 +00:00
Kostya Serebryany
47e5e62e71 [libFuzzer] When -test_single_input crashes the test it is not necessary to write crash-file because input is already known to the user. Patch by Mike Aizatsky
llvm-svn: 250564
2015-10-16 22:41:47 +00:00
Kostya Serebryany
98ed53705f [libFuzzer] don't print large artifacts to stderr
llvm-svn: 249808
2015-10-09 04:03:14 +00:00
Kostya Serebryany
e3d637a4af [libFuzzer] add -artifact_prefix flag
llvm-svn: 249807
2015-10-09 03:57:59 +00:00
Kostya Serebryany
6e1f94e9cd [libFuzzer] fix 32-bit build
llvm-svn: 249646
2015-10-08 00:59:25 +00:00
Kostya Serebryany
d0d9f0b833 [libFuzzer] trying to fix at-exit hang
llvm-svn: 249231
2015-10-03 07:02:05 +00:00
Kostya Serebryany
4487114c63 [libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return int instead of void. The actual return value is not *yet* used (and expected to be 0). This change is API breaking, so the fuzzers will need to be updated.
llvm-svn: 249214
2015-10-02 23:34:06 +00:00
Kostya Serebryany
20a00e008b [libFuzzer] remove experimental flag and functionality
llvm-svn: 249194
2015-10-02 22:00:32 +00:00
Kostya Serebryany
70f0401f05 [libFuzzer] add a flag -max_total_time
llvm-svn: 249181
2015-10-02 20:47:55 +00:00
Ivan Krasin
b941371206 [LibFuzzer] test_single_input option to run a single test case.
-test_single_input flag specifies a file name with test data.

Review URL: http://reviews.llvm.org/D13359

Patch by Mike Aizatsky!

llvm-svn: 249096
2015-10-01 23:23:06 +00:00
Kostya Serebryany
8474784569 [libFuzzer] Marking exported symbols as visible. Patch by Mike Aizatsky
llvm-svn: 248954
2015-09-30 22:22:37 +00:00
Kostya Serebryany
6c4e275248 [libFuzzer] perform fewer crossover operations compared to plain mutations
llvm-svn: 247364
2015-09-11 00:20:58 +00:00
Kostya Serebryany
19cfb70c6a [libFuzzer] refactor the code to allow building libFuzzer on platforms that don't have dfsan and don't support weak functions
llvm-svn: 247321
2015-09-10 18:48:38 +00:00
Kostya Serebryany
0001c18d8c [libFuzzer] add two more variants of FuzzerDriver for convenience
llvm-svn: 247300
2015-09-10 16:57:57 +00:00
Ivan Krasin
cc79d453f1 [libFuzzer]Add a test for defeating a hash sum.
Summary:
Add a test for a data followed by 4-byte hash value.
I use a slightly modified Jenkins hash function,
as described in https://en.wikipedia.org/wiki/Jenkins_hash_function

The modification is to ensure that hash(zeros) != 0.

Reviewers: kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12648

llvm-svn: 247076
2015-09-08 21:22:52 +00:00
Kostya Serebryany
a2e2e93ba1 [libFuzzer] remove a piece of stale code
llvm-svn: 247067
2015-09-08 20:40:10 +00:00
Kostya Serebryany
04cc0059e2 [libFuzzer] be more robust when dealing with files on disk (e.g. don't crash if a file was there but disappeared)
llvm-svn: 247066
2015-09-08 20:36:33 +00:00
Kostya Serebryany
2d2cfbe976 [libFuzzer] better documentatio for -save_minimized_corpus=1
llvm-svn: 247033
2015-09-08 17:43:51 +00:00
Kostya Serebryany
28b0d0ab37 [libFuzzer] remove -iterations as redundant (there is also -num_runs)
llvm-svn: 247030
2015-09-08 17:30:35 +00:00
Kostya Serebryany
a575372f59 [libFuzzer] add one more mutator: Mutate_ChangeASCIIInteger
llvm-svn: 247027
2015-09-08 17:19:31 +00:00
Kostya Serebryany
22e4458e65 [libFuzzer] more accurate logic for traces, 80-char fix
llvm-svn: 246888
2015-09-04 22:32:25 +00:00
Kostya Serebryany
2c51ca12e7 [libFuzzer] when a single mutation fails try a few more times with other mutations before returning un-mutated data
llvm-svn: 246828
2015-09-04 00:40:29 +00:00
Kostya Serebryany
28a699d9b8 [libFuzzer] actually make the dictionaries work (+docs)
llvm-svn: 246825
2015-09-04 00:12:11 +00:00
Kostya Serebryany
3eaa9123bf [libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC
llvm-svn: 246808
2015-09-03 21:24:19 +00:00
Kostya Serebryany
3b60fc1204 [libFuzzer] adding a parser for AFL-style dictionaries + tests.
llvm-svn: 246800
2015-09-03 20:23:46 +00:00
Kostya Serebryany
d4b7d4667f [libFuzzer] deprecate the -tokens flag. This was a bad idea because the corpus with this flag contains encrypted inputs, not the real inputs, which complicates interoperation with other fuzzers. Instead we'll need to implement AFL dictionary support
llvm-svn: 246734
2015-09-02 23:27:39 +00:00