Skip to content

Commit 1f375a5

Browse files
authored
Do not use Entropic and Focus Function together (OSS-Fuzz#4242). (#1942)
* Do not use Entropic and Focus Function together (#4242). * reorder entropic and dataflow as per review suggestion
1 parent 4b316c8 commit 1f375a5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/python/bot/fuzzers/libfuzzer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,10 +1740,16 @@ def pick_strategies(strategy_pool,
17401740
is_mutations_run = (not environment.is_ephemeral() and
17411741
candidate_generator != engine_common.Generator.NONE)
17421742

1743+
if strategy_pool.do_strategy(strategy.ENTROPIC_STRATEGY):
1744+
arguments.append(constants.ENTROPIC_ARGUMENT)
1745+
fuzzing_strategies.append(strategy.ENTROPIC_STRATEGY.name)
1746+
17431747
# Depends on the presense of DFSan instrumented build.
17441748
dataflow_build_dir = environment.get_value('DATAFLOW_BUILD_DIR')
17451749
use_dataflow_tracing = (
17461750
dataflow_build_dir and
1751+
# Focus function is not compatible with entropic mode.
1752+
strategy.ENTROPIC_STRATEGY.name not in fuzzing_strategies and
17471753
strategy_pool.do_strategy(strategy.DATAFLOW_TRACING_STRATEGY))
17481754
if use_dataflow_tracing:
17491755
dataflow_binary_path = os.path.join(
@@ -1789,10 +1795,6 @@ def pick_strategies(strategy_pool,
17891795
fuzzer_path)):
17901796
fuzzing_strategies.append(strategy.RECOMMENDED_DICTIONARY_STRATEGY.name)
17911797

1792-
if strategy_pool.do_strategy(strategy.ENTROPIC_STRATEGY):
1793-
arguments.append(constants.ENTROPIC_ARGUMENT)
1794-
fuzzing_strategies.append(strategy.ENTROPIC_STRATEGY.name)
1795-
17961798
if strategy_pool.do_strategy(strategy.VALUE_PROFILE_STRATEGY):
17971799
arguments.append(constants.VALUE_PROFILE_ARGUMENT)
17981800
fuzzing_strategies.append(strategy.VALUE_PROFILE_STRATEGY.name)

0 commit comments

Comments
 (0)