Repository navigation
Commit 68b29ef
rules/iostream: restore the missing t1 refcount target -- a latent tree-wide load failure
`src.cpp` declares `using t1 = std::ostream;` and `tgt_unsafe.rs` has a `t1`, but
`tgt_refcount.rs` did not. That is the `using tN` with no matching tN target case, which
aborts at LOAD TIME (translation_rule.cpp:233, `ir_src.json type entry has no matching IR
target rule`) and under NDEBUG presents as rc=139 with no message. check-ir.sh reported
`LOAD FAILURE (refcount model) -- this tree poisons EVERY translation`.
It was LATENT, not new. rules/iostream had not been regenerated into a published tree since
Cpp2Rust#164 made Rust type rules standalone functions, so nothing had ever exercised it; it surfaced
only when the module was regenerated for 0edd622's ios_base::in/out keys. The same class of
latent asymmetry was hit twice in one hour, which is why this commit spells the rule out in the
file: A MODULE THAT HAS A tgt_refcount.rs MUST CARRY EVERY KEY IN IT, even where the body is
byte-identical. The "a value-like key needs no refcount override" guidance is about the
ir_refcount.json OVERLAY, and it does not license omitting a TYPE key from the target file.
Body mirrors tgt_unsafe.rs's t1 verbatim, because a plain owned value is model-independent --
no Ptr, no raw pointer, nothing to re-shape. Deliberately NOT "improved": `File::open("")`
always fails so that initializer would panic if it were ever materialised, which deserves its
own look, but changing committed unsafe behaviour while fixing a load failure would conflate
two things.
Also recorded here because it cost two slots and is still open: refreshing pin/ir.v9 to HEAD
exposed a SECOND, unrelated latent load failure, in rules/shared_ptr f1 --
`LLVM ERROR: Expr rule uses init but its src pack is not declared as Init<T, Args>`. That one
is NOT fixed by this commit. f1 records as the bare `std::shared_ptr<T1> std::make_shared()`
with the `Init<T1, Args>` pack LOST while both its targets emit `{"init": null}`; every working
init user (unique_ptr f8, vector f112-114, vector_cxx11 f1-3, deque f12-13, deque_cxx11 f1-2)
records an `init_type` pack and a `(&&...)` key. Removing the unused leading `typename T2` from
f1 -- making it match unique_ptr f8 exactly -- did NOT change the recorded key, so that
hypothesis is dead. pin/ir.v9 is green only because it deliberately retains the OLD pre-break
shared_ptr IR, which is recorded in its provenance file; regenerating shared_ptr into it would
re-poison every agent's baseline via newir.sh. The same error independently blocks all
structured-binding measurement (`auto t = std::tie(x, y)` aborts identically), so it now gates
the top measured row as well.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 0edd622 commit 68b29ef
1 file changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
8 | 29 | | |
9 | 30 | | |
10 | 31 | | |
| |||
28 | 49 | | |
29 | 50 | | |
30 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments