Skip to content

test(fuzz): nightly differential fuzz runner, NAL and INI targets (#144) - #683

Merged
zackees merged 1 commit into
masterfrom
test/144-scheduled-fuzz
Oct 14, 2026
Merged

zackees merged 1 commit into
masterfrom
test/144-scheduled-fuzz

Conversation

@zackees

@zackees zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member

Closes #144.

  • New targets: nal_diff (C oracle vs Rust C ABI vs safe Rust for obs_nal_find_startcode, four alignments, padded allocations; NULL, near-zero and reversed ranges excluded and documented) and config_ini_diff (arbitrary or malformed INI: section order and string lookups across C, the shim and the safe core).
  • rust/tools/fuzz/run.py: Linux local runner for a nightly cron job. It holds an flock on the state directory (exit 75 if another run holds it), builds all targets, runs each under libFuzzer time/RSS/timeout limits, keeps corpora and artifacts, and writes per-run logs plus summary.json (HEAD, dirty files, rustc, cargo-fuzz, exit codes). It exits nonzero on any failure.
  • docs/rust-port/fuzzing.md: setup, pinned nightly (nightly-2026-10-14), cron entry, state layout, crash replay and minimisation.
  • AMF has no Rust port yet, so it has no target.

Evidence

  • Runner, all 5 targets for 60 s each: AVC, HEVC, AV1 and NAL clean. INI found a real mismatch, minimised to 10 duplicate [s] sections and filed as bug(obs-util): config-file duplicate section/key lookup diverges from C after uthash bucket expansion #681 (uthash bucket expansion reverses the order of duplicates). Those lookups are now excluded, with a comment that links the issue.
  • After the exclusion: INI clean for 300 s through the runner (1.05M runs) and for another 240 s after the review fixes. The saved crash and the minimal repro both replay clean. A concurrent runner on the same state dir exits 75.
  • Local gate stamped.

Add nal_diff (direct obs_nal_find_startcode differential) and
config_ini_diff (config_open_string section order and lookups) targets,
plus rust/tools/fuzz/run.py: a locked, bounded local runner that keeps
corpora, artifacts and per-run evidence for a nightly cron job.
Documented in docs/rust-port/fuzzing.md.

config_ini_diff found #681 (duplicate section/key lookup diverges after
uthash bucket expansion); those lookups are excluded until it is fixed.

Closes #144

Local-Gate: v1 tree=9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81 secs=405 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791957343,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ff56ea4bca8d7b192d055190abb801b835f71b3e178baaa7880e9004a8794d26","lane":"lint","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":19,"stamp":"03b2d62b06b2e51cc309afe4216c4c33","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ff56ea4bca8d7b192d055190abb801b835f71b3e178baaa7880e9004a8794d26","lane":"lint","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":19,"stamp":"d8ed4e8ad67b86c81a3e7475338db1ef","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"0c1c02100b785c39c054c5cd9f846bd84a5e6408df9fe547dd2c59dea9c2e3c7","lane":"rust-test","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":119,"stamp":"f516bf5d19fff89db1037197242685f0","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"f57799d80eb57ebfbb8008c642d07930","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"bc6de19a090af122e28f04e33cf9a380","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"060a8bf7a1a36a9b49b923ade7b36d64","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"eeb4e9435007196129ea7bc0111fb5d4","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"7ca9b2b372edd172458a1b5c30dce52e","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"13c3497868fc0cd4245c130a8cc281d307f5dfcb46467a85912a6d3de5f1c632","lane":"cross","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":108,"stamp":"4fb2ab087fcd10137a5455614dd790f8","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
Ci-Attestation: {"at":1791957343,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"a0eeba1d3adc37554b9716117c2544cbc0469272c6952d5a085a893ac6c13c6a","lane":"tier2-linux","parents":["b479cec1716364f0d20bab3c7f1af6758cb3ad29"],"secs":159,"stamp":"64cb6f4f2f25be5c43e748abe407dada","tree":"9a24e3e7c5b6b6b1e40e270a8561b240edb1eb81","v":1,"via":"run"}
@zackees
zackees merged commit e42b09e into master Oct 14, 2026
19 checks passed
@zackees
zackees deleted the test/144-scheduled-fuzz branch October 26, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

quality: Run the cargo-fuzz differential targets on a schedule

1 participant