Repository navigation
[AUTOMATED] feat(p5): structsynth on by default - #682
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…IN off-pass opt-out, PEBNAMES #6/#8 retargeted, off-pass names) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
… structsynth off Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…ure, options.md Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…synth off (cli probe + integration test) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
….txt, record.json, instruments) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
… + phase_catalog recapture Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…ly when every access agrees (+ #677 round trip under the flip, signfield fixture, probe) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…a float-vs-integer field is raw bytes decompile-all/decompile-graph --jobs N numbered struct_N per worker process, so one document used a name for two layouts (fmt O2: 3 renamed prototypes). Every sharded run now passes its workers structsynth off and says so on stderr; the help text and docs say the output equals --jobs 1 --option structsynth off. A synthesized field read both as a double and as a long was typed long, so the movsd read printed (double)a0->field_0x8 (a value conversion). Evidence now accumulates the value classes of every access of the field's width; a float beside a non-float makes the field undefined1[N], so each read casts the address. New fixture unionfield_fp_x86_64 + round-trip test + probes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
… prose for the float rule and the past-the-end piece syntax Accumulating the value classes made a pointer field also read as long and unsigned long (find O2 sub_f620 field_0x8) contest its sign and lose the pointer spelling. A pointer has no sign to get wrong, so the sign contest now applies only when the committed type is an integer, which is exactly the old pairwise rule; the float rule is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
…s, union members, 24-binary delta) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
force-pushed
the
feat/structsynth-on
branch
from
September 18, 2026 22:57
3476d2d to
0a80735
Compare
mahaloz
added a commit
that referenced
this pull request
Sep 18, 2026
…too; re-record stages on 6e4f6fa Since structsynth on by default (#682), a field read both as a float and as an integer is raw-byte filler in the reader's own layout. A container's typed field there would print the float read as a value conversion again, so the ledger's unclaimed-bytes veto covers those bytes as well. Stage baseline re-recorded on 6e4f6fa (+12 structsynth keys, 1156 -> 1168); options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
added a commit
that referenced
this pull request
Sep 19, 2026
…too; re-record stages on 6e4f6fa Since structsynth on by default (#682), a field read both as a float and as an integer is raw-byte filler in the reader's own layout. A container's typed field there would print the float read as a value conversion again, so the ledger's unclaimed-bytes veto covers those bytes as well. Stage baseline re-recorded on 6e4f6fa (+12 structsynth keys, 1156 -> 1168); options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
added a commit
that referenced
this pull request
Sep 19, 2026
…too; re-record stages on 6e4f6fa Since structsynth on by default (#682), a field read both as a float and as an integer is raw-byte filler in the reader's own layout. A container's typed field there would print the float read as a value conversion again, so the ledger's unclaimed-bytes veto covers those bytes as well. Stage baseline re-recorded on 6e4f6fa (+12 structsynth keys, 1156 -> 1168); options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
mahaloz
added a commit
that referenced
this pull request
Sep 19, 2026
…too; re-record stages on 6e4f6fa Since structsynth on by default (#682), a field read both as a float and as an integer is raw-byte filler in the reader's own layout. A container's typed field there would print the float read as a value conversion again, so the ledger's unclaimed-bytes veto covers those bytes as well. Stage baseline re-recorded on 6e4f6fa (+12 structsynth keys, 1156 -> 1168); options.md and the phase_catalog fixture regenerated. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG
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.
By default, a stripped function that reads one object at fixed offsets now gets a
struct_N *parameter, and the reads print as fields.--option structsynth offgives the old output back.Before (
main):After:
The same change turns coreutils
fmtO2'sput_wordfromvoid sub_3000(unsigned long *a0)with*(unsigned int *)&a0[1]intovoid sub_3000(struct_0 *a0)witha0->field_0x8.The change
structsynthdefaults toparam. That covers the catalog row,reset_defaults, and the prose indocs/spec/05-types.mdanddocs/options.md.undefined<N>, which prints unsigned. After [AUTOMATED] fix(p3): keep a narrow load's width when it is read through a wider-typed pointer #677,findO2sub_7670passes a zero-extended 16-bit field to a 32-bit argument (movzwl 0x68). The field had takenshortfrom a read used in a signed compare, sosub_7510(a1->field_0x68)sign-extended the value that [AUTOMATED] fix(p3): keep a narrow load's width when it is read through a wider-typed pointer #677 keeps unsigned. The field is nowunsigned short, which is also what DWARF says.--jobs Nondecompile-all,decompile-graphordecompile-project) runs its workers withstructsynth offand says so on stderr. Each worker numbered its ownstruct_N:fmtO2 at--jobs 4renamed three prototypes, and the project.hmerge tore the definitions apart (lsO2 at--jobs 4gave 23struct {openings and one};). The output now equals--jobs 1 --option structsynth off, and the help text says so. A serial run still synthesizes.char field_0x8[8]), so each read casts the address. For a gcc -O2 union read with bothmovsdandcvtsi2sdq, alongfield printed(double)a0->field_0x8, a value conversion, so a stored 2.5 came back as 4.6e18. It now prints*(double *)a0->field_0x8.elfmain offpass keeps the upstream form withoption structsynth off.PEBNAMES-X86 #6/#8now expect the SEH function's FS base asv->field_0x0/v->field_0x30. The stages baseline changes only by four renamed keys.reliableis the shipped defaults, so it getsparam.aggressiveinherits the default rather than pinningparambelow a futureall.fastonly changes discovery.Evidence
make test675/675, with no datatest assertion moved.make test-stages1156/1156.make test-cli189/189 (four new probes).make rust-testgreen. Three round trips compile the printed C and check the values. [AUTOMATED] fix(p3): keep a narrow load's width when it is read through a wider-typed pointer #677's now also runs at the default.signfield_zext_x86_64handedsink4294941372 before the sign rule.unionfield_fp_x86_64returned 4.6e18 for 2.5 before the float rule.decompile-allover 14 stripped binaries (5,610 functions, x86-64 and ARM32) changes 483 functions. 350 are checked mechanically as the same byte offsets written as fields. I read the other 133, and each accesses the same bytes (docs/features/structsynth/flip.md). No function in either arm has agotowhose label is missing. That includesfindO2sub_f620, which kept this off last time. Eight exported headers declare 311 structures, and everyoffsetofequals its field offset. The two review fixes move 5 of 12,544 functions across 24 binaries, all in crazyfliecf2O2. Three of them copied a float field into anunsigned intarray as a value, and now copy the bits.type_matchcompares pointee names, sostruct_0 *never matches a ground-truthWORD *. Over 444 slices the flip costs one perfect function (959 → 958, aggregate −0.05%). The 19 decisions it moves off a match are real false positives:factor's GMP limb arrays andshred's name buffer. [AUTOMATED] type_match: credit any struct pointer when the source type is a pointer to a struct decbench#93 asks the metric to credit a structure pointer against a pointer to a named structure.decompile-all, interleaved min-of-15): fmt O2 −3.4%, ls O2 +2.9%, sort O2 +2.4%, bash O2 (1.3 MB) −0.6%, inert control +0.7%.structdefsstays off. With this on, it would add 872 lines tolsO2 (+6.4%).structdedup(#675) andstructarraysrebase onto this. Onceprotoorder(#669) lands, a callee'sstruct_Nparameter reaches its callers.🤖 Generated with Claude Code
https://claude.ai/code/session_01YFCA715QE6ZBSnTn7bwabG