Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/clusterfuzz/_internal/bot/fuzzers/centipede/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,10 @@ def reproduce(self, target_path, input_path, arguments, max_time): # pylint: di
rss_limit = constants.RSS_LIMIT_MB_DEFAULT
if constants.RSS_LIMIT_MB_FLAGNAME in fuzzer_arguments:
rss_limit = fuzzer_arguments[constants.RSS_LIMIT_MB_FLAGNAME]

timeout = constants.TIMEOUT_PER_INPUT_REPR_DEFAULT
if constants.TIMEOUT_PER_INPUT_FLAGNAME in fuzzer_arguments:
timeout = fuzzer_arguments[constants.TIMEOUT_PER_INPUT_FLAGNAME]

# Override fuzzer-defined timeouts to match libfuzzer's behavior in
# https://github.com/google/clusterfuzz/blob/d15a65e7753c6c6579f4b395c40e6d45a7bde262/src/clusterfuzz/_internal/bot/fuzzers/libfuzzer.py#L1255
test_timeout = environment.get_value('TEST_TIMEOUT', constants.TIMEOUT_PER_INPUT_REPR_DEFAULT)
timeout = max(1, test_timeout - 5)
os.environ['CENTIPEDE_RUNNER_FLAGS'] = (
f':{constants.RSS_LIMIT_MB_FLAGNAME}={rss_limit}'
f':{constants.TIMEOUT_PER_INPUT_FLAGNAME}={timeout}:')
Expand Down
Loading