forge
Explore
Log in

Don't you dare go Hollow

lane-unwritten-dep r6: the SAFETY comment credited the gate with a census it does not perform

Browse files at this commit

caad117714cd82e253c84d50addbca1d99560929Ahmet Kaan GümüşParent: 691273f
Report/comment accuracy only. Zero non-comment lines changed -- verified with
git diff -U0 filtered for lines that are not /// or //.

1 -- THE GATE DOES ONE CENSUS, NOT TWO. decode.rs and report section 12 said the
sentinel gate "counts at two points, pre-deblock and the output point". It does
not: the gate reads only take_final_unwritten_samples /
take_final_census_scanned, which is ONE census at the output point. The
pre-deblock census (census_unwritten, take_unwritten_samples /
take_census_scanned) is a different instrument, and section 13 of this lane's own
report establishes it has NO committed reader anywhere in the crate on main. So
the two-point claim told a reviewer auditing the unsafe that the premise is backed
by two scans when only one exists -- and the missing one is exactly the scan
that would catch a hole before the filters. Both sites now say the gate counts at
the OUTPUT POINT ONLY and that the pre-deblock census backs nothing here, with the
earlier two-point wording named as the error it was.

2 -- THE FILING NOW RESTS ON THIS LANE'S OWN MEASUREMENT. Section 12 filed the
unsafe on "two distinct plain hashes across five runs", which is second-hand from
lanes/av1unwritten.report.md:118-124, and section 10 of this same report says I
did NOT reproduce it (five plain runs on 8d6998d7, one hash, a761118c8dd5c8d0).
The basis is now the measurement this lane actually took: an exact u16
whole-plane census finding 224 unwritten chroma samples (U 112, V 112, whole 4x4
groups, rows 36..63) in a frame that is SHOWN and whose samples the caller
receives. Uninitialised memory reaching the caller IS the UB and needs no hash
claim. The hash observation is retained but labelled second-hand-and-not-
reproduced, with the note that ambient content is machine-dependent so a stable
value on one host and a varying one on another would be the same defect. The
reachability paragraph was rebased the same way, and the decode.rs SAFETY comment
no longer states the two-hash fact flatly.

3 -- ROW RANGE. decode.rs named the invisible region as "chroma rows 30..63". The
old crop wrote fh.div_ceil(2) = 32 of 64 rows, so the region is rows 32..63, which
is what section 4 of the report already said. The 2048-sample count was right;
only the range was wrong. Corrected, with the arithmetic now shown inline.

Not touched, per instruction: the same two-hash sentence inside
chroma_plane_block_codable's "What led here" is lane/av1unwritten's own prose and
accurately reports a measurement they made -- not mine to reword. The other
stale-prose sites found by the class sweep, the decode path, film_grain.rs, the
reserved 4:2:0 group-tail chroma SKIP arm, decode_rect4_16_intrabc, and the dump
writers' error swallowing.

No merge, no push.
crates/ec-av1/src/decode.rsmodified+31 -14
@@ -21172,7 +21172,9 @@ fn dump_stage16(
21172 // "identical pre-deblock, differs post-deblock" off these dumps is then21172 // "identical pre-deblock, differs post-deblock" off these dumps is then
21173 // measuring the dump's blind spot, not the pipeline's: the samples it could21173 // measuring the dump's blind spot, not the pipeline's: the samples it could
21174 // not see are exactly the region where the 4:2:2 witness's output diverges21174 // not see are exactly the region where the 4:2:2 witness's output diverges
21175- // (chroma rows 30..63, 2048 samples). `round_ss` is the same rounding the21175+ // (chroma rows 32..63 -- the old `fh.div_ceil(2)` crop wrote 32 of 64 rows,
21176+ // so everything from row 32 up was invisible; 2048 samples). `round_ss` is
21177+ // the same rounding the
21176 // decoder's own plane extents use, and it matches the oracle's21178 // decoder's own plane extents use, and it matches the oracle's
21177 // `uv_crop_width` / `uv_crop_height` per axis.21179 // `uv_crop_width` / `uv_crop_height` per axis.
21178 // ONE file per frame: `dump_stage_idx` advances on every call, so creating21180 // ONE file per frame: `dump_stage_idx` advances on every call, so creating
@@ -21744,25 +21746,38 @@ pub(crate) fn census_unwritten_final(y: &[u16], u: &[u16], v: &[u16]) {
21744 /// This comment previously claimed the SB-padded surface "is written21746 /// This comment previously claimed the SB-padded surface "is written
21745 /// sample-for-sample by the tile walk's reconstruction before anything reads21747 /// sample-for-sample by the tile walk's reconstruction before anything reads
21746 /// it", and cited the sentinel gate as proof. **That claim is RETRACTED by21748 /// it", and cited the sentinel gate as proof. **That claim is RETRACTED by
21747-/// measurement, in this same file**: on `440_request_is_422` the decode produced21749+/// measurement.** The basis for the retraction is THIS LANE's own, not
21748-/// TWO different output hashes across five runs with uninitialised planes, one21750+/// second-hand: on `440_request_is_422` an exact u16 whole-plane census at the
21749-/// hash under `EC_AV1_PLANE_SENTINEL=1`, and a pre-deblock census of 11221751+/// pre-deblock point finds **112 unwritten samples per chroma plane, 224 total**
21750-/// unwritten samples per chroma plane (224 total) -- see21752+/// (U and V, 28 whole 4x4 groups each, rows 36..63) in a frame that is SHOWN
21751-/// `chroma_plane_block_codable`'s "What led here" paragraph and21753+/// (`Key show=true`) and whose samples the caller receives. Uninitialised memory
21752-/// `lanes/av1unwritten.report.md`. Output that varies with the buffer's initial21754+/// that reaches the caller was read, or the read that produced it was. That is
21753-/// content means an uninitialised sample was READ. A reviewer approving this21755+/// the UB, and it needs no hash-variation claim to stand.
21754-/// `unsafe` on the old text was approving it on a withdrawn proof.21756+///
21757+/// A hash-variation observation also exists -- five plain runs of the same
21758+/// witness giving two different output hashes (`lanes/av1unwritten.report.md`),
21759+/// which would point the same way -- but it is SECOND-HAND and was NOT
21760+/// reproduced here: five plain runs on `8d6998d7` gave one hash
21761+/// (`a761118c8dd5c8d0`, `lanes/unwritten-dep.report.md` §10). It is not relied
21762+/// on, and the ambient content a run happens to receive is machine-dependent,
21763+/// so a stable value on one host and a varying one on another would be the same
21764+/// defect either way. The 224-sample census is the basis; the hashes are aside.
21755 ///21765 ///
21756 /// WHAT IS ACTUALLY ESTABLISHED, and it is weaker:21766 /// WHAT IS ACTUALLY ESTABLISHED, and it is weaker:
21757 ///21767 ///
21758 /// * The sentinel gate ([`census_unwritten_final`],21768 /// * The sentinel gate ([`census_unwritten_final`],
21759 /// `the_frame_the_caller_receives_carries_no_unwritten_plane_sample`) proves21769 /// `the_frame_the_caller_receives_carries_no_unwritten_plane_sample`) proves
21760 /// that no sample the tile walk never wrote SURVIVES into the frame the caller21770 /// that no sample the tile walk never wrote SURVIVES into the frame the caller
21761-/// receives, on the corpus measured. It counts at two points -- pre-deblock and21771+/// receives, on the corpus measured. **It counts at the OUTPUT POINT ONLY --
21762-/// the output point -- so it measures SURVIVAL, not reads.21772+/// one census, one scan.** The pre-deblock census ([`census_unwritten`],
21773+/// `take_unwritten_samples` / `take_census_scanned`) is a DIFFERENT instrument
21774+/// and has NO committed reader anywhere in the crate on `main`, so it backs
21775+/// nothing here; an earlier revision of this comment credited the gate with
21776+/// both, which would have told a reviewer the premise is covered by two scans
21777+/// when only one exists. It is measured SURVIVAL, not reads.
21763 /// * It does NOT prove "every sample is written before it is read". A sample read21778 /// * It does NOT prove "every sample is written before it is read". A sample read
21764 /// as a prediction or filter neighbour and overwritten a moment later is21779 /// as a prediction or filter neighbour and overwritten a moment later is
21765-/// invisible to both counts. **No such read has been observed, and no21780+/// invisible to that count. **No such read has been observed, and no
21766 /// instrument here measures for one.**21781 /// instrument here measures for one.**
21767 /// * On `main` = `e45cc748` the one path where a read was demonstrated is21782 /// * On `main` = `e45cc748` the one path where a read was demonstrated is
21768 /// UNREACHABLE: lane/av1unwritten refuses the subsize before descending.21783 /// UNREACHABLE: lane/av1unwritten refuses the subsize before descending.
@@ -21792,8 +21807,10 @@ fn fresh_plane(n: usize) -> Vec<u16> {
21792 // sample before any read. That premise was RETRACTED by measurement (22421807 // sample before any read. That premise was RETRACTED by measurement (224
21793 // unwritten samples, output varying with initial content) on a path that is21808 // unwritten samples, output varying with initial content) on a path that is
21794 // now refused, and is UNMEASURED everywhere else. The sentinel gate measures21809 // now refused, and is UNMEASURED everywhere else. The sentinel gate measures
21795- // survival at two points, not reads. So this `unsafe` is sound under a21810+ // survival at the output point, not reads. The pre-deblock census is a
21796- // premise no current instrument proves.21811+ // separate instrument with no committed reader on main, so it adds nothing
21812+ // here. So this `unsafe` is sound under a premise no current instrument
21813+ // proves.
21797 #[allow(unsafe_code)]21814 #[allow(unsafe_code)]
21798 unsafe {21815 unsafe {
21799 v.set_len(n);21816 v.set_len(n);
lanes/unwritten-dep.report.mdmodified+37 -18
@@ -348,22 +348,38 @@ this, so a reviewer can no longer approve the `unsafe` on a withdrawn proof.
348 **The retracted claim.** `fresh_plane`'s doc asserted the SB-padded surface "is348 **The retracted claim.** `fresh_plane`'s doc asserted the SB-padded surface "is
349 written sample-for-sample by the tile walk's reconstruction before anything reads349 written sample-for-sample by the tile walk's reconstruction before anything reads
350 it", and cited the sentinel gate as proof ("proven by the sentinel gate above").350 it", and cited the sentinel gate as proof ("proven by the sentinel gate above").
351-**The same file retracts it**, at `chroma_plane_block_codable`'s "What led here":351+**The same file retracts it.** The basis is **this lane's own measurement**, not
352-on `440_request_is_422`, five runs with uninitialised planes give **two different352+second-hand: on `440_request_is_422` an exact u16 whole-plane census at the
353-output hashes**, five sentinel runs give one, and the pre-deblock census finds353+pre-deblock point finds **112 unwritten samples per chroma plane, 224 total** (U
354-**112 unwritten samples per chroma plane, 224 total**354+and V, 28 whole 4×4 groups each, rows 36–63) in a frame that is **SHOWN**
355-(`lanes/av1unwritten.report.md:126-128`). Output that varies with the buffer's355+(`Key show=true`) and whose samples the caller receives (§4, §5). Uninitialised
356-initial content means an uninitialised sample was **read**.356+memory that reaches the caller was read, or the read that produced it was. That
357-357+is the UB, and it stands without any hash-variation claim.
358-**What the gate actually proves — the weaker claim.** The sentinel census counts358+
359-at two points, pre-deblock and the output point, so it measures **survival, not359+A hash-variation observation also exists — five plain runs of the witness giving
360-reads**:360+two different output hashes (`lanes/av1unwritten.report.md:118-124`) — but it is
361+**second-hand and NOT reproduced here**: five plain runs on `8d6998d7` gave one
362+hash, `a761118c8dd5c8d0` (§10). It is therefore not relied on, and it should not
363+have been stated flatly in the `decode.rs` comment, where it did read as this
364+lane's measurement. Ambient content is machine-dependent, so a stable value on one
365+host and a varying one on another would be the same defect either way; the
366+224-sample census is the basis, the hashes are an aside.
367+
368+**What the gate actually proves — the weaker claim.** The gate counts at the
369+**output point only**: one census, one scan. The pre-deblock census
370+(`census_unwritten`, `take_unwritten_samples` / `take_census_scanned`) is a
371+**different instrument with no committed reader anywhere in the crate on `main`**
372+(§13), so it backs nothing here. An earlier revision of this section credited
373+the gate with both, which would have told a reviewer auditing the `unsafe` that
374+the premise is covered by two scans when only one exists — and the missing one is
375+exactly the scan that would catch a hole before the filters. What the gate
376+measures is **survival, not reads**:
361 377
362 * PROVEN: no sample the tile walk never wrote **survives into the frame the378 * PROVEN: no sample the tile walk never wrote **survives into the frame the
363 caller receives**, on the corpus measured.379 caller receives**, on the corpus measured.
364 * NOT PROVEN: "every sample is written before it is read". A sample read as a380 * NOT PROVEN: "every sample is written before it is read". A sample read as a
365 prediction or filter neighbour and overwritten a moment later is invisible to381 prediction or filter neighbour and overwritten a moment later is invisible to
366- both counts. **No such read has been observed, and no instrument in this crate382+ that count. **No such read has been observed, and no instrument in this crate
367 measures for one.**383 measures for one.**
368 * On `main` = `e45cc748` the one path where a read was **demonstrated** is now384 * On `main` = `e45cc748` the one path where a read was **demonstrated** is now
369 unreachable — lane/av1unwritten refuses the subsize before descending.385 unreachable — lane/av1unwritten refuses the subsize before descending.
@@ -400,13 +416,16 @@ fixes one without the other will re-derive the error.
400 can be proved rather than assumed. That is a real instrument, not a comment,416 can be proved rather than assumed. That is a real instrument, not a comment,
401 and it is the only route that keeps the optimisation as-is.417 and it is the only route that keeps the optimisation as-is.
402 418
403-**Reachability evidence** (what makes this fileable rather than theoretical): a419+**Reachability evidence** (what makes this fileable rather than theoretical),
404-demonstrated read on `440_request_is_422` at `8d6998d7` — 224 unwritten samples,420+**this lane's own measurement**: on `440_request_is_422` at `8d6998d7`, an exact
405-output varying with initial content, two distinct plain hashes across five runs421+u16 whole-plane census finds **224 unwritten chroma samples** (U 112, V 112,
406-— and that path is refused on `main`, so the corpus contains no *currently422+whole 4×4 groups, rows 36–63) in a frame that is **SHOWN** and whose samples the
407-reachable* instance. The claim that needs proving is universal ("every sample is423+caller receives — uninitialised memory reaching the caller IS the UB, and it
408-written before it is read"), and one refused witness cannot establish it for the424+needs no hash claim. That path is refused on `main`, so the corpus contains no
409-other 126 fixtures.425+*currently reachable* instance; the hash-variation observation that also exists is
426+second-hand and was not reproduced here (§10), so it is not part of the basis.
427+The claim that needs proving is universal ("every sample is written before it is
428+read"), and one refused witness cannot establish it for the other 126 fixtures.
410 429
411 ## 13. Does this lane's gate supply the reader `take_unwritten_samples` lacked? — NO430 ## 13. Does this lane's gate supply the reader `take_unwritten_samples` lacked? — NO
412 431