Skip to content

[AUTOMATED] Keep call continuations inside their callers during discovery - #1977

Open
thotypous wants to merge 3 commits into
Noelo-Lab:mainfrom
thotypous:mixed-call-target-roles
Open

thotypous wants to merge 3 commits into
Noelo-Lab:mainfrom
thotypous:mixed-call-target-roles

Conversation

@thotypous

@thotypous thotypous commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

A SPARC call's continuation is listed as a third function, although only the caller and callee are entries.

printf '%s' 400000080100000081c3e008010000000100000001000000010000000100000081c3e00801000000 | xxd -r -p > /tmp/sparc-call.bin
kuna functions /tmp/sparc-call.bin --raw-image --target sparc:BE:32:default:default --base 0 --entry 0
0x0	sub_0
0x8	sub_8
0x20	sub_20
  • Keep callees and local continuation targets separate through listing and cross-references.
  • Stop speculative gaps at mixed call/return boundaries without discarding their call evidence. Keep corroborated SPARC64 large frames.

Carmel predicated calls have the same distinction between the callee and the encoded resume address. This extracts the shared discovery fix from the Carmel work in #1936.

The targeted stages pass 7/7, including a SPARC32 fixture that loses an adjacent callee without the boundary fix. All 56 previously missed real SPARC32 callees survive the Debian comparison; the other 123 non-SPARC ELFs are unchanged.

DecBench: 770 matched binaries. An AMD64 timeout did not reproduce in isolated runs; the only reproducible C change is an ARM parameter narrowed to unsigned char, matching its DWARF type.

Dependency for the Carmel PR (#1936): the shared listing fix keeps predicated-call continuations inside their caller.

Model: openai-codex/gpt-6.2-sol

@thotypous
thotypous force-pushed the mixed-call-target-roles branch from 4e298ea to 0fb9609 Compare November 26, 2026 00:08
@thotypous thotypous changed the title [AUTOMATED] [WIP] Keep call continuations inside their callers during discovery [AUTOMATED] Keep call continuations inside their callers during discovery Nov 26, 2026
@thotypous
thotypous marked this pull request as ready for review November 26, 2026 00:19
@mahaloz

mahaloz commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

[AUTOMATED] Pushed two commits on top of 0fb9609:

  • d383d6c (docs only): spec 01 said gap validation always follows a call's explicit continuation, but since the second commit the plain gap walk ends the body when every branch exit comes after the call. The walk paragraph now says so and points at §1.6. The SPARC64 large-frame and call-resume paragraphs name their source files, and the no-return section states how the tail and reachability rules treat conditional and mixed call/branch instructions.
  • f9ff928: merge of main 7fd05b7 ([AUTOMATED] Print a compiler-merged range test as its two comparisons (option rangetest) #1979). The stage corpus count is 933 and docs/baseline-stages.json has 5,504 assertions; a fresh --save-baseline on the merged tree is byte-identical.

Checked on the merged tree: make test 675/675, make test-stages 5,504/5,504, check-spec, catalog, counters, options.md, test-tools and test-cli. functions is byte-identical outside SPARC on 2,830 binaries (x86-64, ARM/Thumb, AArch64, MIPS, PPC32, PPC64 ELFv1/ELFv2, RISC-V, i386, PE32/PE32+, Mach-O and raw images), and so is decompile-all on 567, apart from functions that hit the time budget. Both SPARC fixtures rebuild byte-identically from their .S with binutils 2.44.

thotypous and others added 3 commits November 26, 2026 06:25
[AUTOMATED]
- Retain direct callee and branch roles for mixed-flow instructions across the decoded listing and its consumers.
- Keep genuine SPARC64 frames discoverable without a histogram trained on false continuation entries.
- Cover both outcomes end to end in the stage corpus.
When all local branch exits pass through a call in an issue that ends in return, stop speculative gap growth at the issue. Keep call corroboration and leave returning paths to the recursive walk.
Cover direct and relative bypasses in the gap proof and check SPARC32 adjacent large frames with an ELF regression.
…-return rules in spec 01

The walk section said gap validation always follows a call's explicit
continuation; the plain gap walk now ends the body there when every branch
exit comes after the call, so say so and point at section 1.6. Name the
source of the SPARC64 large-frame rule and the call-resume boundary, record
the measured SPARC64 effect, and state how the no-return tail and
reachability rules treat conditional and mixed call/branch instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
@thotypous
thotypous force-pushed the mixed-call-target-roles branch from f9ff928 to 7c01884 Compare November 26, 2026 09:40
@thotypous

Copy link
Copy Markdown
Contributor Author

[AUTOMATED] Rebased on 477cb29ed. Workspace, release, and all 5,527 stage assertions passed. The 146-ELF Debian run reproduces all 916 previously audited SPARC entry/output deltas exactly and shows no changes in the other 11 ABIs. DecBench: identical coverage and GED, one ARM C change, and one additional exact type match.

This branch has not been deployed

No deployments
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.

2 participants