Repository navigation
Rebuild exit 18: memory places and records, prototypes, surface pads - #424
Merged
Merged
Conversation
The memtypes design (round 18): the ADR lands whole and its rows go in before "The current stack". doc/adr-aggregates.md links the extension. scripts/roadmap_gaps.py passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
A site is one call of r2sleigh_load_uN or r2sleigh_store_uN in the body;
a static inline prelude definition is no site. The script reads pddj
records and prints body loads and stores, residual sites (checked
against `residuals`), typed address sites, the address class table
(ported from the memtypes measure), lvalue sites, named frame objects
and typed pointer locals. `diff` fails when a down counter rises or a
typed counter falls. O(code bytes) per function.
Red first: the round 14 to 17 counter on
scripts/testdata/memory_sites/prelude_helper.json, whose body calls
r2sleigh_load_u64 3 times,
len(re.findall(r"r2sleigh_load_u\d+\(", code)) == 4
test_a_prelude_definition_is_no_site asserts 3.
Validation: on the eb327af records the class table equals
measure-r2s.md section 2 row for row. At 5f39d32 (DecBench, 2,621
records, code equal to round 17's exit dump): loads 34,819, stores
20,361, residual sites 7,282, typed address sites 4,721, 0 of 55,180
unparsed. Output moves 0. The census ratchet stays open: census.py run
writes pdd text, not pddj records.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…re UNDEFINED
e07f0032, e0ff40b2 and 007c0012 decoded and lifted as `orr w0, wzr,
0xffffffff`, `orr x0, xzr, -0x1` and `and w0, w0, 0xffffffff`. The Arm ARM's
DecodeBitMasks, called with immediate TRUE by the logical immediates:
// For logical immediates an all-ones value of S is reserved
// since it would generate a useless all-ones result (many times)
if immediate && (imms AND levels) == levels then
UNDEFINED;
DecodeWMask32 (5 rows) and DecodeWMask64 (6 rows) in AARCH64instructions.sinc
match any imms. They also feed BFM, SBFM and UBFM (ImmR_bitfield32_imm and
ImmR_bitfield64_imm, and the bit-field constructors directly), which call
DecodeBitMasks with immediate FALSE: `lsr w0, w0, #1` is UBFM with imms 31.
So those rows stay. New LogicalWMask32 and LogicalWMask64 rows, one per
element size, exclude the all ones imms (32: b_1014 0x1f, 16: b_1013 0xf,
8: b_1012 0x7, 4: b_1011 0x3, 2: b_1010 0x1, 64: b_1015 0x3f) and export the
DecodeWMask value. The 12 logical immediate constructors of AARCH64base.sinc
(grep: and :226 :237, ands :273 :287, eor :2356 :2367, mov alias :3939 :3952,
orr :4623 :4635, tst :7075 :7089) read them. Ghidra master 3fb3eec6a0 is
identical; the patch and description are in the scratchpad for upstream,
nothing opened. Listed in vendor/README.md.
Red on the parent (aarch64_logical_immediate_filling_its_element_decodes_to_nothing):
0x32007fe0 decoded as Ok("orr w0, wzr, 0xffffffff")
Green: 69 words (each element size in W and X, and, orr, eor, ands, the mov
alias and tst) decode and lift nothing; controls orr w0, wzr, 0x1;
mov w0, 0x55555555; lsr w0, w0, 0x1; sxtw x0, w0;
orr x0, xzr, 0x7fffffffffffffff still decode and lift. r2sleigh-lift
--all-features: all targets pass (lib 129, aarch64_oracle 2, decode_sweep 10).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
`iee` was empty on x86_64-noshdr-jmpslot and sht_null_symbols:
`initialisers` read sections by sh_type only, and neither image keeps a
section header, while DT_INIT_ARRAY holds 0x3de8 (slot 0x1130) and 0x1eec
(slot 0x550), DT_FINI_ARRAY 0x3df0 (0x10e0) and 0x1ef0 (0x500).
gABI, "Dynamic Section": "DT_INIT_ARRAY This element holds the address of
the array of pointers to initialization functions"; "DT_INIT_ARRAYSZ This
element holds the size in bytes of the array of initialization functions
pointed to by the DT_INIT_ARRAY entry". The same for DT_FINI_ARRAY,
DT_PREINIT_ARRAY and their SZ tags. The loader reads them through
PT_DYNAMIC; section headers are optional for execution.
r2image `loader::dynamic_arrays` reads each tag with its size tag (a tag
without its size states nothing) and places the array in the file through
the PT_LOAD that holds it, inside the file. `initialisers` reads the
section arrays and these as one slot list, sorted by place: a slot both
state is one entry, the dynamic table's (stable sort). Each slot is read as
the loader leaves it (the existing write_at rule). O(d) per tag, O(n log n)
in slots. Mach-O and the section path are unchanged.
Red on the parent (crates/r2image/tests/initialiser_arrays.rs, new):
a_section_less_image_lists_the_arrays_its_dynamic_table_states
left: []
right: [(Init, 4194816, ..), (Init, 4194832, ..), (Fini, 4194848, ..), (Preinit, 4194864, ..)]
an_array_tag_without_its_size_states_nothing
left: []
right: [(Fini, 4194848, ..), (Preinit, 4194864, ..)]
a_slot_stated_by_a_section_and_the_dynamic_table_is_listed_once
left: [(Init, 4194816, ..), (Init, 4194832, ..)]
Gate (Mac, release, radare2 6.2.5): `iee` on both witnesses lists radare2's
entries (init 0x1130 and fini 0x10e0; init 0x550 and fini 0x500). radare2's
vhaddr column prints the slot's file offset (0x2de8 where DT_INIT_ARRAY
states 0x3de8): radare2's, r2s prints the stated address. `aa; afl` moves
against the base: x86_64-noshdr-jmpslot adds entry.init0 0x1130,
entry.fini0 0x10e0 and fcn.00001070 (called at 0x1108 from entry.fini0);
sht_null_symbols adds entry.init0 0x550, entry.fini0 0x500, fcn.00000470
(called at 0x536), fcn.00000410 and fcn.0000058c. Each is a row radare2's
`aa; afl` lists with the same size and block count. `ie` unchanged.
r2image --all-features: all targets pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Measured at 5f39d32 over DecBench with a probe patch that ships nothing (doc/adr-frame-model.md, "D654 step 0"): - 120 listed functions refuse the whole frame on some promotion pass (4,693 class A sites; 100 on every pass, 4,171 sites). 120 more traced entries are callees built for a listed caller: 102 against 217 at eb327af is listed functions against every entry. - Every unplaced address has known base candidates: 119 functions refuse on a derived point, 1 as `whole`, none on an address with no points. - A probe that applies D654's rule (each derived point an escape either way) leaves the dump byte-identical, 2,621 of 2,621: refused passes fall 555 to 4, and the new promotions are register saves pdd elides. An escape reaches every place up to a save, and every -O2 save sits above every local. D654 stops on that fact; D674 names it. - Each of the 9,437 class A sites has its kept reason, 0 unexplained. The largest kept class besides the refusal is D369's `rewritten` (2,747 sites): D675. Output moves 0. ROADMAP: D654 status, D674 and D675 claimed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
- 102 is the listed refused functions with a frame site, the same set in the eb327af traces; 217 is reproduced by no join, and is stated so. - Under the probe that applies D654's rule, the formerly refused functions' 4,693 sites stay as reached by an escape 3,122, two widths 789, opaque 749: the reach (D674) is the largest class. - D637 re-probe on AArch64 switch-hello-world `_vfprintf_r` 0x16e9c: the rule lifts its whole-frame refusal, but `[sp, 0x90]` is accessed at two widths and stays in memory; the table read stays unresolved, 198 loads and stores unmoved. Recorded in D637's row. Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
A callee that mints no call contract (an unproven result or a floor of parameters) was called through the convention fallback, which read argument k from the k-th integer register (r2ssa semantic/boundaries.rs convention_call_boundary). find O2-noinline 0x12588 passed R9 as fcn_12370's sixth formal, a double whose home is XMM0 (psABI 3.2.3: the INTEGER and SSE classes take their own register sequences). CalleeStatement states each formal's call-site home. An exact arity reads each home; a floor fills its homes, then the integer slots past the last integer home (call_slots); a home below the floor no walk reaches refuses DeclaredArgumentUnreached, where the parent dropped it. O(homes) per site. Red on the parent (5f39d32), call_boundary:: a_site_passes_each_argument_at_its_callee_formal_home: panicked at call_boundary.rs: r2sleigh_result_u64 caller(r2sleigh_unread_u64 arg0, ..., r2sleigh_word_u64 arg5) rax_2 = (uint64_t)f(0x2000, 0, 0, 0, (r2sleigh_word_u64*)(uint64_t)0U, (double)arg5); DecBench (memory_sites.py, 2,621 functions): residual sites 7,282 to 7,275; loads 34,819, stores 20,361, typed address sites 4,721 unchanged; 21 functions move, each read against pd (ROADMAP D546). By hand: - find O2 0x13c30 (pdd @ 0x13c30, find O2): before: rax_5 = fcn_13aa0(..., 0x2bbe8, (double)r2sleigh_residual_u64(5)); after: rax_5 = fcn_13aa0(..., 0x2bbe8, r2sleigh_float_from_bits_64((uint64_t)0x40f5180000000000U)); pd: 0x13c6b movsd xmm0, [0x311a8] (86400.0). Residuals 8 to 2. - find O2-noinline 0x12510: header fcn_12510(arg0..arg5) becomes fcn_12510(arg0, arg1, arg2), a floor (R9 may reach fcn_12370); the call passes 86400.0, loaded at 0x12576, in place of (double)arg5. - find O2-noinline 0x14700: the call at 0x147b7 now refuses (CallNotRendered: arity at least 6, the call writes 7): fcn_12370 is a floor whose R9 reaches error, and pd shows 0x14795 mov r9, [0x3e650]. - find O2 0x7e50: fcn_19e90(void*, double) was called with one argument; now "no value reaches its declared argument 1" (XMM0 at 0x7f66). Goldens 500 of 500 unchanged. Plain and colour output change only in the call arguments and headers listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
rust_nonnull_x86_64 and switch-hello-world.elf printed `static false`:
posture.rs cleared statically_linked on any PT_DYNAMIC, though both hold
PT_DYNAMIC only for their own relative records, with DF_1_PIE, no
PT_INTERP and no DT_NEEDED.
Citations: gABI "Program Interpreter": the interpreter "receives control
and provides an environment for the application program"; with none,
nothing but the image's own start-up builds it. binutils
include/elf/common.h: `#define DF_1_PIE 0x08000000`.
Posture::statically_linked: bool becomes Option<bool> (r2abi statement.rs):
Some(true) with no PT_INTERP and either no PT_DYNAMIC, or no DT_NEEDED with
DF_1_PIE in DT_FLAGS_1; Some(false) with PT_INTERP, DT_NEEDED or DT_SONAME;
otherwise None, and `i` prints no `static` row. Symbol exports decide
nothing. Its one reader is `i`/`ij` (r2s commands.rs; r2engine json.rs was
already Option<bool>). Statement::permanence reads segments and the sealed
ranges, neither this field nor `interpreter` (read). is_static_image
(no PT_DYNAMIC) asks another fact and stays; its doc line says so. One pass
over the dynamic table already read for RELRO.
Red on the parent (crates/r2image/tests/posture.rs, the test written against
the parent's bool):
static_is_what_the_interpreter_and_the_dynamic_table_state panicked:
a static PIE states static
Golden move, judged (ROADMAP "Judged golden moves"): cmd `posture` "shared
object" loses `static false`: arm_plt_lld_be8.so's 10 dynamic tags hold
no DT_NEEDED, DT_SONAME or DT_FLAGS_1 (read by hand), so nothing states it.
By hand (Mac, release, radare2 6.2.5+38388): rust_nonnull_x86_64 and
switch-hello-world.elf `static true` (was false); rust_nonnull_nopie no
static row; x86_64-noshdr-jmpslot `static false` (PT_INTERP). Of 61
top-level ELF files with PT_DYNAMIC and no PT_INTERP or DT_NEEDED: base
agree 1, unstated 14 (images r2s does not open), differ 46; head agree 3,
unstated 55, differ 3 (ld-2.27.so, ld-2.31.so, ld-2.32.so: r2s false from
DT_SONAME). radare2 6.2.4, the pin, prints false on any PT_DYNAMIC
(elf.c:2401-2412): D665 judges the rows. Tests: r2image, r2abi, r2s (500
goldens) pass; workspace clippy --all-features --tests clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
… agree An import data object gets a type only where three statements agree: the loader copies the symbol to that address (`R_*_COPY`), a cited r2abi row declares the name for the image's C library, and the copy's width is the type's size. The name alone binds nothing. - r2abi: data/objects.txt (glibc 2.39 libio/stdio.h:149-151, posix/bits/getopt_core.h:36,50) read into LibraryRows beside the prototypes; WriteKind::Copy names the copied symbol where the symbol states a size (r2image elf.rs fills it). - r2engine: declared::copied_object binds the row; object_types interns debug information's types, then the row's (Interned::then, graph.rs), each only at the copy's width. O(log W) per named object. - r2source: SourceDataObject carries the row's citation; r2types: DataObjectTypeProvenance::Library; r2dec: the proof line counts them. Step 0: all 318 refusals and 995 B1 sites sit on an R_X86_64_COPY of the same symbol at the same address (GLOB_DAT 0, neither 0). Red first, on 185447f (test adapted to the unit WriteKind::Copy): declared_data::a_copied_optarg_on_glibc_is_its_declared_object FAILED return r2sleigh_carrier_u64((uint64_t)r2sleigh_load_u64((void*)&optarg)); ... 1 data object type refused ... DecBench (2,621 functions, memory_sites.py diff base to head): loads 34,819 -> 34,664, stores 20,361 -> 20,339, residual sites 7,282, typed address sites 4,721, lvalue sites 0 -> 177, data object type refusals 318 -> 297. 11 functions moved; every moved line is optarg or optind helper to name (177), an extern line (21) or the proof line (11). compile_check on the 11 moved units: same verdicts as base (4 reject on an undeclared `signal`, as at base). Goldens: none moved. Read by hand against pd: grep O2 0x5050 (mov r12d, dword [obj.optind] at 0x51fd) - r2sleigh_store_u32((void*)&optind, (uint32_t)((uint64_t)rax_64 + (uint64_t)1U)); + optind = (int32_t)((uint64_t)rax_64 + (uint64_t)1U); cmp O2 0x2940 - rdi_18 = r2sleigh_load_u64((void*)&optarg); + rdi_18 = (uint64_t)optarg; diff3 O2 0x2a60 - tmp_2e45_0_1 = r2sleigh_load_u32((void*)&optind); + tmp_2e45_0_1 = (uint32_t)optind; Open: stdin, stdout, stderr (818 sites) stay byte copies. FILE * names struct _IO_FILE, which r2dec's Tags never reads from a data object's graph, so globals.rs cannot declare it; r2types placeable refuses the opaque tag. Owner: r2dec render/tags.rs. Files outside the chain list: crates/r2abi/src/statement.rs (WriteKind::Copy), crates/r2image/src/loader/elf.rs (its producer), crates/r2engine/src/program/naming.rs (pattern), crates/r2engine/src/ declared/graph.rs (Interned::then, sized), crates/r2source/src/lib.rs (SourceDataObject citation), crates/r2engine/tests/engine/linked_guard.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
- D655: the lvalue licence reads promotion's reach, and every kept class A site fails it for the reason promotion refused it; at most 13 of 9,437 sites have no such reason. Naming without lvalues moves 0 loads and stores. Not built. - D647: a rule from r2ssa slot facts alone moves frame_agree pdd-only 3 to 2 (afv-only 0); the other two are proven reloads the rendering still reads through `frame`, a decision of r2types' binding plan (function_facts/prepared.rs). Not built; probe patch in the scratchpad. Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
A local probe (scratchpad d641-probe.patch, not committed) printed per function from r2ssa's address facts and certificates at 5f39d32 over 2,621 DecBench functions. Table in doc/adr-memory-places.md, "D641 step 0". - RAM accesses 84,079: parameter expression 18,130 / 1,577 / 227 by 0, 1, 2+ index terms; pointee 2,271 / 1,177 / 120; frame 35,561 / 384 / 1; none 24,631. - Loaded pointer bases: 7,081 accesses join by field (2,161 through a pointee expression, 4,920 through a load root with no expression), 292 only through a reaching store (frame slots), 164 from globals. - `PointeeObjectKey` must alias readers: memory SSA and `same_content_reads` refused as proof (37 pointee pairs through two loads of one path; kept, recorded); round trips proven by address value (their object-only write check misses calls: recorded for the owner); the slice is diagnostic. - `ObjectId` dense from 0 in 2,621 of 2,621 functions. - 177 parameters where places alone lay out another structure than the def-use reach: D642 keeps the reach for byte identity. Base counters re-counted on 5f39d32: loads 34,819, stores 20,361, residual sites 7,282, typed address sites 4,721. Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
… defines No code. A local trace in render::values (gap, effect_gap; kept as the scratchpad's d659-probe.patch) over DecBench at 5f39d32, joined to the call gap at the same instruction: every ValueNotComputed (1,001) and EffectNotRendered (389) site is a CallDefine of a call that is itself CallNotRendered. By the call's refusal: MayHandOn 637, ImportUnstated 222, CountFromRegisters 198, VariadicCount 177, Floor 120, CountRegisterSet 20, SlotSkipped 16; 0 unclassified, 0 beside a rendered call. r2dec states none of these facts. Table with pd witnesses in doc/adr-decompiler-rewrite.md; rows D666 to D669 proposed (VariadicCount stays with D464). Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
No code. A local probe over `aa; ax` (scratchpad d656-probe.py) counts .bss cells whose walked accesses all read or write one width at the cell's start, with no formed address at or below in .bss and nothing exported or relocated there: DecBench 72 cells, 914 sites (516 loads, 398 stores); pumasim 0 cells; 0pack 1. Cells lost: formed address 1,076, two widths 23, exported or relocated 77 (DecBench). The reference index already carries widths, but no cold pdd builds it: reading it costs cold pumasim pdd @ 0x23fdf0 119.28 G -> 174.36 G instructions (+46%, 374 -> 415 MiB) and cold 0pack pdd @ 0x62ecf0 73.80 G -> 104.15 G (+41%, 288 -> 317 MiB), Mac release. Over the 2% stop, so D657 is held: it needs a program wide access fact that lists no body. Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
r2ssa `memory_places.rs` states, for every structured memory access, one
base (`Parameter`, `Loaded(access)`, `Frame`, `Global`, `None`) and one
`Place` (`Field`, `Element`, or `Unplaced` with a reason), a column in
`memory_accesses` order. `StructuredDataflowFacts::position` addresses it
in O(1): each instruction's first position plus the ordinal. The loaded
root of an address is a dense column over values, each resolved once;
`O(A + V)` per function. No new id type, no map keyed by an entity id.
Deleted: `ParameterFields`, `ParameterFieldAccess`, `ParameterFieldRefusal`,
`collect_parameter_fields` (certificates/fields.rs), `ObjectModel::access_path`,
and `ObjectModel::{parameter_objects, pointee_objects}` (no reader outside the
builder, which keeps its interning). `ObjectModel::objects` is a dense
`ObjectTable` indexed by `ObjectId` (ids minted from 0; D641: dense in
2,621 of 2,621 DecBench functions). `global_objects` stays: the memory
location of a constant address looks it up by address (shared.rs).
Policy unchanged this row: r2types `aggregates.rs` and r2dec `members_of`
read `MemoryPlaces::parameter`, the parameter's def-use reach read against
the places (`memory_places/reach.rs`). D641 counted 177 parameters where the
places alone, without the reach, would lay out another structure; the reach
goes with D643, where a refusal covers one span.
Failing first, `semantic::tests::places::the_access_through_a_loaded_pointer
_states_a_place` (`mov rax,[rdi+0x38]; mov ecx,[rax+8]`: base
`Loaded(first)`, `Field{8,4}`), written against the parent with
`parameter_fields`; red there:
{0: Constant([ParameterFieldAccess { offset: 56, width: 8, access:
StructuredAccessId { inst: InstId(1), ordinal: 0 }, value:
Some(ValueId(3)), is_write: false }])}
The four `fields.rs` cases are ported to `places.rs`.
Gate: DecBench full `pddj` records 0 of 2,621 differ from base 5f39d32;
loads 34,819, stores 20,361, residual sites 7,282, typed address sites
4,721, all unchanged. Goldens 500 pass. r2ssa, r2types, r2dec tests pass.
Dylint on r2ssa clean (r2types callee.rs:403 and r2dec warnings are the
base's). No rendering changed, so no excerpt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
- 217 is reproduced: `frameb.py` counts every traced entry, a callee built for a listed caller included, that refuses and never promotes a slot (217 at eb327af, 113 listed; its 3,519 sites are `frame + K` only). 102 is the listed refused functions with a frame site. - One pass definition: 87 refuse on every pass (4,171 sites), 15 on some. - D674 states the at most 197 sites its two counts share. - D637: the walk sees 7 accesses at entry -1136, at two widths. - D647, traced per home: shapes 0x401515 (15 loads) and rv_O0g 0x144c (1 load) read homes whose every load is a proven reload r2types offers to the parameter, yet render through `frame`; the binding is decided at render time, so no upstream fact states it. Not built. - D655's naming half waits on D647. Output moves 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Edits by content in scripts/diff_r2_judged.toml: 1. The aoj entry `r2s = '^orr x\d+, xzr, '` (r2-right) is deleted. It is stale since 9b774b5 added `move_wide_preferred`: `e00360b2` is `orr x0, xzr, 0x100000000` (movz x0, #1, lsl 32 writes the value, so MOV (bitmask immediate) is not preferred), and the entry, matched first, said radare2's `mov x0, 0x100000000` was right. 2. The `orr`/`mov` entry's r2 pattern widens to `^mov [wx]\d+, (0x[0-9a-f]+|\d+)$`, covering radare2's hex spelling. 3. The `i` `static` entry's reason: radare2 6.2.4 prints static from no library (libr/core/cbin.c:1048, `r_list_empty (obj->libs)`); r2s says false where PT_INTERP, DT_NEEDED or DT_SONAME states another loader (ld-2.27.so, ld-2.31.so, ld-2.32.so). No permanence rule reads it: its one reader is `i` (D663). The 2 static PIEs leave it: r2s now says true. The 12 images of the pinned testbins that lose their `static` row under D663 are `[[missed]]`: 11 deliberate (radare2 infers true from no DT_NEEDED), x86-64-ovl-ptload.so unfilled under D663 (one of the 4 exportless images; arm64-relative-plt.elf, phdr-hash-nchain-unmapped.so and x86_64-x32-relative.so are not in testbins 3bc992e7). 4. The `entry\.(init|fini)1` entry (static-glibc-2.27) notes that it goes stale once the radare2 pin passes 3dd89422 (radare2#27538); kept at 6.2.4. Verdict counts, base to head: judged r2-right 34 to 33 (r2s-right 109, deliberate 98, unfilled 27 unchanged); missed deliberate 4 to 5, unfilled 1 to 2. scripts/test_diff_r2.py: 46 tests pass. The 12 images were found by `i` on base and head over the 309 pinned ELF files (14 moves: 12 false to no row, rust_nonnull_x86_64 and switch-hello-world.elf false to true, which agree with radare2 6.2.4's true). D490 on contabo grades it at the exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
`addsd xmm0, xmm1; ret` (f20f58c1c3) listed two formals in afv as r2sleigh_word_u64 while pdd printed fcn_0(void): r2dec `parameters` answered None for the whole list when `agreed` met a declared integer class on a float register, and the header then stated no parameters, which the formals contradict (C17 6.7.6.3p10). Owner r2types: parameter_declaration_fact read the body's signature, a width-only word, before the interface's own Float node. at_slot_class states a float register's width-only integer formal as the float of its width (psABI 3.2.3 SSE class, AAPCS64 6.8.2 C.1) on Convention; a type stating basis stands. File outside the chain's hunks: r2types function_facts/mod.rs parameter_declaration_fact (:1043-1053), the one reader every declaration goes through. r2dec lists the formals up to the first whose class is unknown, leaves the header unspecified, and the proof line states "the signature is refused: parameter k's C class is unknown, so the parameters listed are a floor". O(formals). Red on the parent (d243fc5), signature::the_header_lists_the_formals_afi_states: assertion `left == right` failed: r2sleigh_result_u64 f(void) left: ["r2sleigh_word_u64 _", "r2sleigh_word_u64 _"] right: ["double _", "double _"] DecBench: `(void)` headers with an afv formal 7 at the base, 5 at d243fc5, 0 here. Residual sites 7,275 to 7,167; loads 34,819, stores 20,361, typed address sites 4,721 unchanged; 5 functions move. Goldens 500 of 500 unchanged. By hand (pdd, against pd and afv): - bzip2 O2 0x8d80: fcn_8d80(void) becomes fcn_8d80(void* arg0, r2sleigh_word_u32 arg1, double arg2); `rbx_1 = r2sleigh_residual_u64(1)` becomes `rbx_1 = (uint64_t)arg0`; 16 residuals to 4. - find O2 0x7670: fcn_7670(void) becomes fcn_7670(uint32_t* arg0, uint16_t* arg1, double arg2) as afv lists; loads through r2sleigh_residual_u64(n) read arg1 and arg0; 71 residuals to 12. - grep O2 0xcb90: header fcn_cb90(void* arg0, r2sleigh_word_u64 arg1, r2sleigh_word_u64 arg2, double arg3); 12 residuals to 3. Plain mode: the header line and the reads it names; no ANSI added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
scripts/comment_runs.py named four runs the two rows added or grew (r2image lib.rs initialisers 10 lines, posture.rs linked_alone 3, the two tests' fixture docs 3 and 4); each is two lines now and cites its ROADMAP row for the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
`fmov d0, x0; ret` (0000679ec0035fd6) gave an empty afv and afi `x0, EntryInput`; `fsub d0, d0, d0` and `fadd d0, d0, d1` lost their float formals. The x86-64 twin `movq xmm0, rdi; ret` keeps RDI. Step 0: r2abi convention.rs states (q1, q0) and r2source typed_results takes q0 as the float lane; both are right. The lane was lost in r2ssa recover_interface.rs: x0 is AArch64's integer result register and its first argument register, so an untouched x0 is handed back, and that branch named v0 a carrier without observing what feeds it. On x86-64 RAX is no argument register, the integer result is Void, and the Void branch observes XMM0. The handed-back branch now observes v0's live-out and states Written where the body writes v0. Default-deny holds: the change observes more, never less. AAPCS64 6.9 "Result return": "a result is returned in the registers an identical first argument would be passed in (x0 and x1, or v0 to v3 for an HFA or HVA, consecutive from v0)"; AARCH64.cspec lists v0 among its outputs. Red on the parent (693196e), result_lanes::an_aarch64_float_result_lane_is_read_at_a_return_as_xmm0_is: assertion `left == right` failed: FunctionInfo { ..., convention: Some(Aapcs64), arguments: [], ... } left: 0 right: 1 Moved test: result_reads::an_argument_handed_back_beside_a_written_ float_stays_unproven_where_a_call_reads_it (`fmov d0, #1.0; ret`) goes from "unproven (EntryInput)" to "unproven (Written)": the body writes v0, and a value reaching a return outranks a handed-back input (r2types UnprovenCause::of). It stays unproven and never returns arg0. By hand (r2s -a arm -b 64, pdd and afv), parent then head: - fmov d0, x0; ret: fcn_0(void), EntryInput, afv empty -> fcn_0(r2sleigh_word_u64 arg0), Written, `arg0 @ x0`. - fsub d0, d0, d0; ret: fcn_0(void) -> fcn_0(double arg0), `arg0 @ d0`. - fadd d0, d0, d1; ret: fcn_0(void) -> fcn_0(double arg0, double arg1). DecBench 0 moved (x86-64); goldens 500 of 500 unchanged. Plain mode: the header and the proof line's cause only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…seam D656's probe gains a predecessor overlap check (cells unchanged, 72) and counts per image: gzip holds 898 of the 914 pdd sites; its cells sit below its first formed .bss address. Reading the reference index costs pumasim aa; pdd @ 0x3b6b20 50.81 G -> 106.36 G (+109%, 208 -> 285 MiB), so neither request path builds it today. D653's row names the three r2dec/r2types hunks that close stderr, stdout and stdin together. D653's moved lines, rechecked line for line (new line = old line with each helper replaced by the name, a cast allowed): 155 loads, 22 stores (two fold `(uint32_t)1U` to `optind = 1;`), 21 extern lines, 11 proof lines; 0 other. Census on the committed binaries: byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
… top bit
0pack LIEF::DEX::File::raw(bool) const 0x673c60 dispatches at 0x673f3d:
`sub r12b, 0x73; js 0x673f90; lea rcx, [0x7602c0]; movzx r12d, r12b;
movsxd rax, [rcx + r12*4]; add rax, rcx; jmp rax`.
Step 0 (R2DEC_TRACE_REFUSAL): the read was 256 entries 0x7602c0..=0x7606bc
(the movzx of a byte, 0..255), and the fetch refused at an entry past the
table: "256 entries of 4 bytes: entry target 0x7602c0 is not an
instruction". The `js` bound was never taken: r2ssa values.rs `narrow`
read no signed comparison.
Invariant: SF is the result's top bit (Intel SDM Vol. 1 3.4.3.1), so `js`
not taken on an N-bit result, `!(x s< 0)`, proves x in 0..2^(N-1)-1. In
general a signed test at or above a non-negative bound, `x s>= b` or
`x s> b` with every b in 0..2^(N-1)-1, meets [b, 2^(N-1)-1]; the existing
step carries it to the zero extensions. Every other signed test still
proves nothing (a negative or unknown-sign bound, or a test below a
bound). The false edge now flips SignedLess and SignedLessEqual as it
flips the unsigned kinds. O(1) per comparison.
Red on the parent (crates/r2engine/tests/engine/chain_switch.rs, the
dispatch from bytes with 512 bytes of another table after its 128 words):
a_sign_test_on_a_byte_bounds_its_zero_extended_index
assertion `left == right` failed: r2sleigh_result_u32 f(r2sleigh_word_u8 arg0)
left: 256
right: 128
(the parent resolved all 256, sending entries 128..255 to the table's own
first byte). Inline values.rs test: `js` not taken gives 0..127, `x s> 5`
6..127, `!(x s<= 9)` 10..127, `3 s<= x` 3..127; `x s< 0` taken and a
bound of -16 prove nothing.
0pack by hand (Mac release): the read is 128 entries 0x7602c0..=0x7604bc,
18 distinct arms, every one inside the FDE 0x673c60..0x676452, the table in
a read-only PT_LOAD (flags R); entries 128.. are another function's table
(0x67783b, 0x678aef, ...). `afb @ 0x673c60` 63 to 319 blocks, the only
`aa; afl` move on 0pack and pumasim. pdd before: `tmp_673f36_10_1 =
r2sleigh_load_u32(... * 4U) + 0x7602c0U)); r2sleigh_residual_void(19);
/* r2dec gap: UnresolvedIndirectBranch at 0x673f2b */`; after: `switch
(tmp_lane_673f25_5_0_1) { case 114: { ... ` with 128 case labels.
Gates: DecBench (dump.py, 2621 functions, base 5f39d32 and head) moved 0
records: loads 34819, stores 20361, residual sites 7282, typed address
sites 4721 at both. Broken value solves on `aa; pdd`: 0pack 0 and 0,
pumasim 1 and 1, the same body. r2ssa (845), r2engine (934 engine), r2s
(500 goldens) pass; Dylint on r2ssa, r2engine, r2image, r2abi adds no
warning. Mac wall time is noisy (median s, base to head: cold 0pack 6.06
to 6.25, pumasim aa; pdd 3.75 to 4.31, cold pumasim 8.83 to 9.25; peak RSS
equal); contabo instructions grade it at the exit. The local probe
(survey.unwinding bypassed in a local build only) passes 0x46d0cb.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
D646 step 0 (pumasim QVariant::operator== 0x2ff630, `pd`): the compares
follow the calls (0x2ff675 `call canCast`, then 0x2ff67e `cmp r8d, 0x12;
ja`; 0x2ff6ce, then 0x2ff6d9 `cmp r8d, 0x22; ja`), but they test r8d and
the dispatches index with 64-bit r8 (`movsxd rax, [rdx + r8*4]`), whose
upper half is whatever canCast leaves in a call-clobbered register (psABI
3.2.1). R2DEC_TRACE_REFUSAL: the walk's build refuses ("0x2ff684 ... it
steps by 1 and reads 4 bytes" over the whole 64-bit range); the later
interprocedural build, which reads canCast's kept registers, reads 19 and
35 entries but fetches call tables only. The bound rests on a callee's
register effect at the walk: a missing upstream fact, so the row stops.
D632 re-probe (Mac release, survey.unwinding bypassed in a local build
only, never committed): 0pack passes 0x46d0cb and names 0x4786e5; pumasim
names 0x2ff6ef. D630 and D631 stay open behind both images.
D680 (claimed from surface-pads' D680-D682): 0x4786e5 `xor eax, eax; pop
rdx; ret` lies inside check_arg_id(unsigned).isra.73 (STT_FUNC 0x4786d2,
size 33) after `call fmt::v5::internal::error_handler::on_error`, which
`afi` proves noreturn; no transfer reaches it. Owner r2engine
program/reads.rs unaccounted_code. D681 and D682 unused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…tarted extern_agree.py on DecBench at 64254c0: 440 of 6,319 pairs differ (443 of 6,323 at 5f39d32), 11 callees declared two ways (13), 30 declaration-disagrees (30); census 3 of 200. The six fcn_12370 and fcn_13aa0 sites pass XMM0 since D546. Two literal red-first candidates are green; the census log is the red evidence. D350's build was not started this round, so D456 with D522's entry gate does not hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
r2types: `Constraint::Field { base, offset, width, value }` adds a record
access to the base's class in the incremental solver; a union moves the
smaller record list into the larger. `solve_evidence_types` emits one Field
per access `MemoryPlaces` places at a constant offset of a parameter, O(A).
`records.rs` lays a class out: members are the accesses that contain no
other (suffix minimum of ends, O(A)); an unaligned or negative member, and
a wider access that starts inside a member (`Interior`) or ends inside one
(`Straddle`), refuse that access alone; a wider access from a member's
start to a member's end or padding is a span. A member read as two solved
types is untyped. `OneWidth` counts members and refused accesses, not spans.
O((V + A) a(V) + A log A), no fixpoint, no cap.
Deleted: `aggregates.rs` (`layout`, `parameter_aggregates`,
`InferredAggregate`), `FunctionTypeFacts::{inferred_aggregates,
parameter_structures}` (now `records`), D642's parameter reach
(`memory_places/reach.rs`). r2dec `members_of` spells each access at the
member or span its record states, else keeps the byte arithmetic; the all
or nothing rule is gone. r2dec `tags.rs`: a pointer member of an inferred
record whose tag the unit cannot name is `void *` (11 functions had lost
their record once a callee's own record named the pointee).
Failing first, crates/r2engine/tests/engine/memory_places.rs, on parent
26db428: 1 passed, 3 failed:
an_indexed_access_leaves_the_constant_fields_members:
r2sleigh_load_u8((void*)((uint64_t)arg0 + (uint64_t)8U * 1U))
a_copy_over_members_leaves_the_members:
r2sleigh_load_u32((void*)(uint64_t)arg0)
an_interior_access_refuses_only_itself:
r2sleigh_load_u32((void*)((uint64_t)arg0 + (uint64_t)1U * 4U))
r2types inline: {4@0, 8@8, 16@0} span; {8@0, 4@4} refuses only 8@0 as
Interior; {8@0, 8@8, 16@0} and argv[1..3] OneWidth; pointer and integer
reads leave the member untyped.
DecBench (base 5f39d32 to head): typed address sites 4,721 to 14,207;
loads 34,819, stores 20,361, residual sites 7,282, 0 functions moved on
any of the three. 502 functions move. Lines: (a) member address 9,075,
plus 411 where the text named a copy, reload or merged register; (b)
struct definition 4,755; (c) parameter type to the record pointer, here or
as a callee prototype, forward declaration or argument cast, 1,723; (d)
proof line 264. clang -fsyntax-only (compile_check.py flags) on all 502
with 3,214 offsetof assertions: 0 fail, errors 2 at base and head.
Goldens 500 of 500 unchanged.
Read by hand (pdd, plain):
libz O2 0xdb20 `mov eax, dword [rdi + 0x1734]`
- tmp_db20_8_1 = r2sleigh_load_u32((void*)((uint64_t)arg0 + (uint64_t)0x5cdU * 4U));
+ tmp_db20_8_1 = r2sleigh_load_u32((void*)&arg0->f_1734);
diff O2 0x6d60 `mov rdi, qword [r15 + 0x1f8]`, r15_1 = (uint64_t)arg0
- tmp_6f39_8_1 = r2sleigh_load_u64((void*)((uint64_t)r15_1 + (uint64_t)63U * 8U));
+ tmp_6f39_8_1 = r2sleigh_load_u64((void*)&arg0->f_1f8);
bzip2 O2 0x88a0, tmp_8b34_0_1 = (uint64_t)((uint64_t)arg0 + (uint64_t)0x2a0U)
- tmp_8b34_8_1 = r2sleigh_load_u32((void*)tmp_8b34_0_1);
+ tmp_8b34_8_1 = r2sleigh_load_u32((void*)&arg0->f_2a0);
Colour mode prints the same tokens; no mark changes.
Open: D74 held (`certified_parameter_pointers` reads the records); D671
(a 16-byte span keeps its byte arithmetic: r2dec's 128-bit path reads no
member).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Where the integer result carrier is handed back and every return resolves it (a carrier that is no argument register, merged with the caller's value), the handed-back branch now observes both lanes' live-outs; where it is unresolved, as AArch64's x0 always is, the float lane's alone, which the parent's branch never adopted either. Each case observes at least what 64254c0 observed. O(blocks) for one more live-out walk on that branch only. DecBench 0 moved against 64254c0; r2ssa and r2engine tests 1,948 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
r2types solver: each class keeps its pointer fields (offset to a node every value loaded from that field joins); a union merges the smaller field map into the larger and joins colliding pointees through a pending queue, each union one fewer class: O((V + A) a(V) + A log A). Only field-based pointers are record bases: a load whose own place is a field of a parameter or of another field-based pointer (one pass, O(A)); a pointer reloaded from a frame slot, a global or an unplaced address joins nothing. A class whose pointer fields lead back to it is refused `Recursive` (Tarjan over record classes) and named on the proof line. Classes are tagged by the lowest parameter slot, else the lowest accessing instruction. r2dec spells `&((struct T *)q)->f_K` through the variable holding the loaded word (`MemberCell::Through`); no declaration changes. Failing first, crates/r2engine/tests/engine/memory_places.rs, on parent 1acb3a6: 5 passed, 2 failed: a_pointer_loaded_from_a_field_has_a_record: tmp_1004_8_1 = r2sleigh_load_u32((void*)(uint64_t)((uint64_t)tmp_1000_8_1 + (uint64_t)8U)); a_record_its_pointer_field_leads_back_to_is_refused: no "(Recursive)" a_reloaded_pointer_with_no_proven_store_has_no_record passes on both (the refusing half). DecBench (D643 head to here): typed address sites 14,207 to 20,401; loads 34,819, stores 20,361, residual sites 7,282, 0 functions moved. 301 functions move: member address through a cast 6,225 lines, struct definition 3,929, proof line 300; diff O2-noinline 0xc290 refused Recursive (31 sites back to byte arithmetic, 32 lines); find O2 0xa990 and O2-noinline 0xbde0 2 lines each where D470's text renaming reuses `rbx_1` once the addresses stop reading it. 2,658 offsetof assertions hold; clang errors 2 before and after. Goldens 500 of 500 unchanged. Read by hand (engine test, `mov rax,[rdi+0x38]; mov ecx,[rax+8]`): - tmp_1004_8_1 = r2sleigh_load_u32((void*)(uint64_t)((uint64_t)tmp_1000_8_1 + (uint64_t)8U)); + tmp_1004_8_1 = r2sleigh_load_u32((void*)&((struct fcn_1000_at_1004*)tmp_1000_8_1)->f_8); find O2 0xa990 (`[rbx + 0x118]`, rbx loaded at 0xa99a): - r2sleigh_store_u64((void*)(uint64_t)((uint64_t)rbx_1 + (uint64_t)0x118U), (uint64_t)r2sleigh_residual_u64(3)); + r2sleigh_store_u64((void*)&((struct fcn_a990_at_a9a6*)tmp_a99a_0_1)->f_118, (uint64_t)r2sleigh_residual_u64(3)); Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Contabo instructions:u, median of 3, one run: base 5f39d32, D642 26db428, D643 1acb3a6, D644 e5579c0. Per row: D642 -0.27%, -0.12%, -0.01%, -0.04%, bash pdf -0.43%; D643 +0.05%, +0.05%, +0.02%, +0.03%, bash pdf +0.110% (cause line: the record solve; -0.25% against the base); D644 +0.02%, -0.01%, +0.00%, +0.01%, +0.06%. Peak RSS 349 to 346 MiB on cold pumasim, the rest equal. Cold equals `aa;` on all three. Mac 50-function session 451.5 to 438.9 MB. Gates on e5579c0: D490 0 unjudged (base 0); equivalence x86-64 828, 0 status moves, 0 definitions changed; AArch64 (--measure time) 828, 0 moves; certification 0 invented; history 0 of 9; void 0 of 1,858; frame_agree --committed bounds held; no-aa goldens 103 of 105, the same 2 differ at base on the Mac. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…o 221 D490 (contabo, radare2 6.2.4, testbins 3bc992e7) head b372468 against base 5f39d32 moves two lines of the per-binary summary: - libshella-2.10.3.1.so `px 64`: r2s now starts at 0x142c, the first entry D662 reads from DT_FINI_ARRAY (its .init_array header is zeroed; e_entry is 0), where radare2 starts at 0; both `iee` list 0x142c fini, 0x19c0 and 0x21ec init. Judged deliberate. - 0pack `axt` radare2-only 16 to 0: D648's 18 arms in 0x673c60 hold the references radare2 found; elf axt r2-only 237 to 221, recorded. `i`: agree 192 to 206, judged 22 to 8, r2-judged 0 to 12 (D665's [[missed]] entries all match), r2-only 33 both. aoj and pd: no line moves (none of the D664 encodings is in the corpus). 0 unjudged once this entry is in; no other count moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…rected Cold 0pack `pdd @ 0x62ecf0` (contabo, perf instructions:u, median of 3, base 5f39d32 to head b372468): 75.281 to 75.448 G (+0.22%), peak RSS 266 to 272 MiB. Cause: the 128-entry read of 0x673c60's dispatch resolves 18 arms, so the walk lifts 319 blocks where it stopped at 63 and walks 4 more bodies. `census.py stats`: walked.computed 3393 to 3397, call_boundaries.reused 11359 to 11369; no other counter moves. The other four timing rows: cold pumasim +0.039%, bash aa; pdd -0.001%, pumasim aa; pdd +0.013%, bash pdf +0.013%; outputs byte-identical on all nine. D663's row notes that 30b3403's message misread radare2: 6.2.4 prints `static true` from no library (libr/core/cbin.c:1048). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
This reverts 3532c94 and 64254c0. D660 stops on a fact. AArch64 equivalence (contabo, --measure time), 3532c94 against 5f39d32: 3 of 828 records leave `equal` for `residual-trap` with changed C: hashes clang-O2 crc32_init and main, review clang-O2 fill. r2s-d661 (693196e) renders all three as the base does, so D660 moved them. Chain: the handed-back branch stated `Written` for v0, so Supply::handed_back is false (r2engine program/fates.rs:176), decided_result answers Unread where no call reads a lane, and r2ssa call_lanes (recover_interface.rs:4088) returns the two-carrier Unproven { integer, float } at a call that reads neither lane; r2dec refuses it (CallNotRendered, "its result's class is unproven"). crc32_init and fill then match their x86-64 twins (residual-trap at base and head); main does not, as x86-64 main renders fcn_4016a0(). Next owner: call_lanes for a callee that hands x0 back on every return. Kept: result_lanes::an_aarch64_call_reading_no_lane_of_a_written_ float_callee_is_rendered (`fmov d0, #1.0; ret` called by a caller reading neither lane). Red on 3532c94: panicked at crates/r2engine/tests/engine/result_lanes.rs:1173:5: r2sleigh_residual_void(1); /* r2dec gap: CallNotRendered at 0x1010:9 ... call to scratch: its result's class is unproven */ Green here. r2ssa and r2engine tests pass (933 engine). DecBench is x86-64: D660 moved 0 there, so D350's step 0 count stands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
…660's next owner untraced extern_agree.py on DecBench (440 of 6,319 pairs) and an `aa; pdd` scan of every caller whose extern result differs from the callee's header: of 270, 130 calls discard the value, 138 read it within the header's lane, 2 read a lane the header lacks (grep O2-noinline 0x143dc, bzip2 O2-noinline 0xe9f4). Parameters: 284 a cast, 74 a tag (both directions), 30 a count against a floor header. D350 stays open, not built; D456's entry gate did not hold. The D350 count was measured with D660 in, which moved no x86-64 output; the wording drops D660. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM # Conflicts: # scripts/cost_causes.txt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM # Conflicts: # scripts/cost_causes.txt
On the merge, r2dec lib test failed to compile: expected `(&ProofClauses, (_, _), _, _, _)`, found `(&ProofClauses, (_, _), {integer}, _, _)` (proof.rs:573).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
On the merged tree structure-report rose too_many_lines 239 to 241, cognitive_complexity 18 to 20 and excessive_nesting 436 to 447, and comment_runs listed 4 new 3-line runs. Each is paid where it was added; no behaviour moves. - r2types evidence: the private Tarjan `on_cycles` is deleted; recursive records read r2ssa's `dense::Condensation` (one SCC owner, O(N + E)). `field_based`'s walk is `Based::settle`. - r2types records: `layout` splits `distinct` and `definition`; solver `unify` merges pointees through `entry`. - r2dec proof: `note_object_types` and `note_layouts` leave `note_unproven_constructs`; tags: the inferred `void *` fallback is a `spelled_members` argument; values: `member_name` and `through_loaded` leave `members_of`. - r2ssa boundaries: `call_slots_at`, `call_results` and the home-count check in `stated_call_arguments` leave `convention_call_boundary`. - Four comments shortened to two lines. Tests: r2ssa, r2types, r2dec, r2engine, r2s, r2abi 3,272 pass; clippy --all-targets clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
The stack row (#423), #421 and #422 merged, round 18's exit paragraph, hack ledger rows 7 (D670's second affine walk) and 8 (D74's second reader), and DecBench's 548 moved functions under Judged golden moves. The two chain lines in cost_causes.txt bound to chain parents (5f39d32, 26db428) are replaced by three lines on bd8d52c, measured on the merged head: cold 0pack +0.268% (D648, D643), bash aa; pdd +0.191% and pumasim aa; pdd +0.213% (D643's record solve; D546/D661), each bisected on the Mac by merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51fb15ab7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A record class with no parameter was named by its lowest access's instruction address alone, so two classes rooted at accesses of one instruction (`movsb` through two loaded pointers) were both spelled `fcn_<entry>_at_<address>`; `Records::definitions` then kept one definition and the other class's field indices read it. `RecordName::At` now carries the access's position, and `tags` spells the k-th later class at that address `_<k>`. The first keeps today's spelling, so DecBench renders byte-identical (2,621 of 2,621). O(C log C) over the classes. Red on the parent: its spelling gives ["fcn_1000_arg0", "fcn_1000_at_1010", "fcn_1000_at_1010", "fcn_1000_at_1020"] for the names the new test passes; the test asserts "fcn_1000_at_1010_1" for the second class. Tests: r2types, r2dec, r2engine, r2s 2,304 pass; clippy --all-targets clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
… follow-up) 963671c gave two classes one instruction roots two tags, tested on the naming function alone. `Records::definitions` still overwrote silently on a duplicate tag. It now refuses the tag (`DuplicateTag` refusal evidence, debug_assert in debug builds), so no member reads another record's layout if a namer regresses. Test: memory_places::two_records_first_accessed_by_one_instruction_keep_their_own_layouts runs movsb through two loaded pointers and checks each pointer prints with its own record (fcn_1000_at_1011, fcn_1000_at_1011_1). Red on 0bc0b25 (the parent of 963671c) plus the test: one struct fcn_1000_at_1011, and the 4-byte read at offset 4 of tmp_1003_8_1 prints as ->f_8. With 963671c's naming reverted and the refusal kept, the debug_assert fires: record tags named twice: {"fcn_1000_at_1011"}. Tests: r2types, r2dec, r2engine, r2s 2,305 pass, 0 fail, 1 ignored; golden files unchanged; clippy --all-targets clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuild exit 18 merges round 18's five chains onto master bd8d52c in the ruling's order: gate-objects, surface-pads, prototypes, frame-objects, places-records. The round is graded on DecBench output (memory places and records,
doc/adr-memory-places.md).Rows
scripts/memory_sites.py), D653 foroptargandoptind, D659, D656 and D641 step 0, D642 (MemoryPlaces), D643 (Constraint::Field, parameter records), D644 (records through loaded pointers), D546 (a site passes each argument at its callee's formal home), D661 (pddnever prints(void)when formals exist), D664 (AArch64 reserved logical immediates), D662 (init/fini arrays), D663 (staticstated by the container), D665 (judged table), D648 (sign-bounded dispatch).stdin/stdout/stderr(struct _IO_FILEundeclarable).Integration commits:
scripts/cost_causes.txt.dense::Condensation. DecBench byte-identical before and after (2,621 of 2,621).RecordName::Atcarries the access position); DecBench byte-identical.cost_causes.txtlines on bd8d52c replace the two bound to chain parents.Output gate (DecBench, 2,621 functions,
memory_sites.py, base master bd8d52c)The merged head holds 958 typed sites more than places-records' own head (20,401); the 12 functions D546/D661 move hold 966, most in bzip2 O2 0x8d80, whose formals D661 states and whose record D643 then lays out (862 sites). Residual sites rise in 3 functions (find O2 0x7e50 5 to 9, O2-noinline 0x14700 1 to 5, bzip2 O2 0x8350 5 to 6); read for 0x7e50: a callee's grown arity leaves a declared argument no value reaches, so the call is a residual, not a guessed argument.
extern_agree.pyon DecBench: 443 of 6,323 pairs differ at the base, 346 of 6,319 at the head; callees declared two ways 13 to 11;declaration-disagrees30 to 30.Hand-read against
pd: bzip2 O2 0x8d80 (movsxd rax, [rdi + 0x6c]is&arg0->f_6c,int32_t), grep O2 0x5050 (optind,optarglvalues), diff O2 0x6d60 (struct fcn_6d60_arg0), find O2 0x7e50 (a callee's grown arity refuses the call), cold 0packpdd @ 0x62ecf0on the merged head (callee prototypes take record pointer types,struct fcn_4c5980_arg0 *, opaque tags declared).Exit bar
The contabo gates (timing, D490, equivalence, certification, void, history, frame_agree) ran on f75ae3e. The later commits are behaviour-preserving refactors and the tag fix; DecBench renders byte-identical across them (2,621 of 2,621), and CI grades the final head.
--workspace --all-features --all-targets -D warningscargo test --workspace --all-features --no-fail-fast--lib --bins)statsstats_baseline.txtaagoldens equalaa; X(the twocall_lineentries, as at the base)--committedaxtradare2-only 16 to 0 (D648);iagree 192 to 206 (D663)--measure time)Timing (contabo
instructions:u, median of 3, bd8d52c / head)pdd @ 0x23fdf0(cold)pdd @ 0x62ecf0(cold)aa; pdd @ 0x2e630aa; pdd @ 0x3b6b20pdf @ 0x1e1d0(cold)CI on the final head 963671c (qemu counted instructions against bd8d52c): cold pumasim 0.9968, cold 0pack 0.9998, bash
aa; pdd0.9999, pumasimaa; pdd1.0003; allocations 0pack 1.0026, session 1.0017 (budget 1.02). The structure payments made the final head cheaper than f75ae3e.Open rows with facts
Recursiverefusals).memory_places.rswalks load-rooted addresses besideaddress.rs.certified_parameter_pointersreads the records beside the solve.FILE *namesstruct _IO_FILE, which r2dec cannot declare for a data object (818 sites).call_lanesfor a callee that hands x0 back on every return.rd18-record-tags(36ac8c6, no PR) holds an engine test of the movsb collision and aDuplicateTagrefusal; 963671c's test is helper-level.pointer_table's existing checks; no new test covers them.canCast, whose register effect the walk lacks. D680: 0pack 0x4786e5 after a noreturn call. D632, D630, D631 wait on both images.🤖 Generated with Claude Code
https://claude.ai/code/session_01456qmqCGpCWJkrg6JUZNNM