Skip to content

coverage: forward rss_limit_mb from target options - #16464

Open
speranza-survivor wants to merge 1 commit into
google:masterfrom
speranza-survivor:coverage-rss-limit-options
Open

speranza-survivor wants to merge 1 commit into
google:masterfrom
speranza-survivor:coverage-rss-limit-options

Conversation

@speranza-survivor

Copy link
Copy Markdown

The coverage runner ignores each target's .options file: run_fuzz_target in
infra/base-images/base-runner/coverage hardcodes

local args="-merge=1 -timeout=100 $corpus_dummy $corpus_real"

while fuzzing runs (run_fuzzer) do apply .options via parse_options.py.
So a target cannot raise the RSS cap for corpus replay, and one currently
sits at 0.0% on the introspector because its coverage task dies at libFuzzer's
built-in 2048 MB default:

Coverage error: out-of-memory (used: 2346Mb; limit: 2048Mb)

(libpcap's fuzz_filter; the libpcap side sets rss_limit_mb in its .options
in the-tcpdump-group/libpcap#1803, which only takes effect for the coverage
task once this change lands.)

This change forwards only rss_limit_mb from the target's .options to the
replay args, reusing parse_options.py the same way run_fuzzer does. Other
fuzzing options may be unsuitable for corpus replay and are not forwarded.
When the option is absent, or malformed, the previous behavior is unchanged.

coverage_test.sh (added next to coverage) runs the real script against a
stub target and asserts:

  • .options with rss_limit_mb = 4096 -> -rss_limit_mb=4096 is passed
  • no .options, only other options, or a malformed value -> nothing extra
  • other options (max_len) are never forwarded
  • existing args (-merge=1, -timeout=100) are preserved

On the unpatched script the two forwarding cases fail; on the patched script
all five pass.

End-to-end check with a real libpcap coverage build inside base-runner: the
patched script reads the post-#1803 .options, passes -rss_limit_mb=4096
to fuzz_filter, and the full pipeline (merge -> llvm-profdata -> llvm-cov)
completes with 8,048 of 15,811 lines covered.

Scope note: this change is verified to make coverage honor the target's
configured RSS limit and to complete the public-corpus coverage pipeline. The
production OOM that motivated the libpcap .options change did not reproduce
in our environment, so the effect of 4096 MB on it is unverified; the limit is
sized as headroom over the ClusterFuzz-observed 2346 MB peak.

@google-cla

google-cla Bot commented Nov 5, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

The coverage runner ignores each target's .options file while run_fuzzer
applies it, so a target cannot raise the RSS cap for corpus replay. Forward
only rss_limit_mb, preserving the default when the option is absent.

coverage_test.sh runs the real script against a stub target and asserts the
forwarding matrix: present -> forwarded; absent/malformed -> nothing;
other options (max_len) never forwarded; existing args preserved.
@speranza-survivor
speranza-survivor force-pushed the coverage-rss-limit-options branch from d8dace6 to 985b2b6 Compare November 5, 2026 16:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant