Skip to content

Commit

Permalink
[libFuzzer][chrome] Dont set an rss_limit_mb.
Browse files Browse the repository at this point in the history
Chrome fuzzing thinks it's not needed because the OOM killer can be relied on.
We didn't have one for AFL.

Related: #4134
  • Loading branch information
jonathanmetzman committed Aug 1, 2024
1 parent b3a7ad4 commit c7b68db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/clusterfuzz/_internal/bot/fuzzers/libFuzzer/fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from clusterfuzz._internal.bot.fuzzers import builtin
from clusterfuzz._internal.bot.fuzzers import options
from clusterfuzz._internal.base import utils
from clusterfuzz._internal.bot.fuzzers.libFuzzer import constants


Expand Down Expand Up @@ -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
Expand All @@ -57,6 +61,9 @@ def get_arguments(fuzzer_path) -> options.FuzzerArguments:
if rss_limit_mb > max_memory_limit_mb:
arguments[constants.RSS_LIMIT_FLAGNAME] = max_memory_limit_mb




return arguments


Expand Down

0 comments on commit c7b68db

Please sign in to comment.