Skip to content

Fuzz: subnormal floor in the norm check - #165

Merged
dvillacis merged 1 commit into
masterfrom
fix/fuzz-norm-check-subnormal-floor
Nov 11, 2026
Merged

dvillacis merged 1 commit into
masterfrom
fix/fuzz-norm-check-subnormal-floor

Conversation

@dvillacis

Copy link
Copy Markdown
Owner

The nightly fuzz run of 2026-11-11 (run 43008741247) failed with a norm-like prox grew |z| beyond |x| on tv1d_l2 (float64, γ = 1.703). This is a false positive in the harness; the library is unchanged.

Cause

The row was (d, d, 0, 0) with d = 2^-1074, and the prox returned (d, d, d, d). The exact result is the row's mean d/2, which no double represents: 0 and d are equally close, and the kernel returns d. That gives ‖z‖ = 2d against ‖x‖ = 1.41d, and the check had only a relative tolerance.

Change

The norm check in fuzz/fuzz_ops.cpp now allows each entry of z a few subnormals, the floor check_structure already uses. Relative to the row's largest entry the allowance is below 1e-15 once that entry is a normal number, so the check is as strict as before at ordinary scales.

Verification

  • The crash input reproduces locally with fuzz_ops_standalone before the change and passes after it.
  • 1.2 million random inputs (seeds 1–4, 300,000 each) pass.
  • libFuzzer itself was not rerun locally (Apple Clang lacks it); the next nightly run does that.

🤖 Generated with Claude Code

The nightly run of 2026-11-11 failed on tv1d_l2 with the row (d, d, 0, 0),
d = 2^-1074: the piecewise mean d/2 comes back as d, so |z| = 2d against
|x| = 1.41d. No double is closer to the mean; the check had only a relative
tolerance. It now allows each entry of z a few subnormals, as
check_structure does. The library is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@dvillacis
dvillacis merged commit e11aba5 into master Nov 11, 2026
23 checks passed
@dvillacis
dvillacis deleted the fix/fuzz-norm-check-subnormal-floor branch November 11, 2026 15:33
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