From 17f818d0fc2cfef03c94f0393d1f02c01786ee86 Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Thu, 1 Aug 2024 08:56:20 -0700 Subject: [PATCH] [libFuzzer][chrome] Dont set an rss_limit_mb. (#4135) Chrome fuzzing thinks it's not needed because the OOM killer can be relied on. We didn't have one for AFL. Related: https://github.com/google/clusterfuzz/issues/4134 --- src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py b/src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py index 074484f1b6..25638533ab 100755 --- a/src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py +++ b/src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py @@ -14,6 +14,7 @@ """libFuzzer fuzzer.""" import psutil +from clusterfuzz._internal.base import utils from clusterfuzz._internal.bot.fuzzers import builtin from clusterfuzz._internal.bot.fuzzers import options from clusterfuzz._internal.bot.fuzzers.libFuzzer import constants @@ -44,7 +45,10 @@ def get_arguments(fuzzer_path) -> options.FuzzerArguments: if timeout is None or timeout > constants.DEFAULT_TIMEOUT_LIMIT: arguments[constants.TIMEOUT_FLAGNAME] = constants.DEFAULT_TIMEOUT_LIMIT - if not rss_limit_mb: + if not rss_limit_mb and utils.is_chromium(): + # TODO(metzman/alhijazi): Monitor if we are crashing the bots. + arguments[constants.RSS_LIMIT_FLAGNAME] = 0 + elif not rss_limit_mb: arguments[constants.RSS_LIMIT_FLAGNAME] = constants.DEFAULT_RSS_LIMIT_MB else: # psutil gives the total amount of memory in bytes, but we're only dealing