Skip to content

Commit

Permalink
[libFuzzer] Enable entropic strategy. (#1822)
Browse files Browse the repository at this point in the history
* [libFuzzer] Enable entropic strategy.

Entropic showed signficant improvement over default libFuzzer
in FuzzBench reports (example:
https://www.fuzzbench.com/reports/2020-05-24/index.html).

Enable the strategy for 50% of runs.

* Update strategy schema
  • Loading branch information
jonathanmetzman committed Jun 10, 2020
1 parent d1750a9 commit 3dc2201
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/python/bot/fuzzers/libFuzzer/constants.py
Expand Up @@ -24,6 +24,8 @@

DATA_FLOW_TRACE_FLAG = '-data_flow_trace='

ENTROPIC_ARGUMENT = '-entropic=1'

DICT_FLAG = '-dict='

FOCUS_FUNCTION_FLAG = '-focus_function='
Expand Down
4 changes: 4 additions & 0 deletions src/python/bot/fuzzers/libfuzzer.py
Expand Up @@ -1772,6 +1772,10 @@ def pick_strategies(strategy_pool,
fuzzer_path)):
fuzzing_strategies.append(strategy.RECOMMENDED_DICTIONARY_STRATEGY.name)

if strategy_pool.do_strategy(strategy.ENTROPIC_STRATEGY):
arguments.append(constants.ENTROPIC_ARGUMENT)
fuzzing_strategies.append(strategy.ENTROPIC_STRATEGY.name)

if strategy_pool.do_strategy(strategy.VALUE_PROFILE_STRATEGY):
arguments.append(constants.VALUE_PROFILE_ARGUMENT)
fuzzing_strategies.append(strategy.VALUE_PROFILE_STRATEGY.name)
Expand Down
2 changes: 2 additions & 0 deletions src/python/fuzzing/strategy.py
Expand Up @@ -34,6 +34,8 @@
name='corpus_mutations_ml_rnn', probability=0.50, manually_enable=False)
DATAFLOW_TRACING_STRATEGY = Strategy(
name='dataflow_tracing', probability=0.50, manually_enable=True)
ENTROPIC_STRATEGY = Strategy(
name='entropic', probability=0.50, manually_enable=False)
CORPUS_SUBSET_STRATEGY = Strategy(
name='corpus_subset', probability=0.50, manually_enable=True)
FORK_STRATEGY = Strategy(name='fork', probability=0.50, manually_enable=False)
Expand Down
4 changes: 4 additions & 0 deletions src/python/metrics/fuzzer_stats_schema.py
Expand Up @@ -319,6 +319,10 @@
'mode': 'NULLABLE',
'name': 'strategy_corpus_mutations_ml_rnn',
'type': 'INTEGER'
}, {
'mode': 'NULLABLE',
'name': 'strategy_entropic',
'type': 'INTEGER'
}, {
'mode': 'NULLABLE',
'name': 'slow_units_count',
Expand Down

0 comments on commit 3dc2201

Please sign in to comment.