Skip to content

returndup: default-ON (DIV-18) — recover O0 early-return shapes by default - #127

Merged
mahaloz merged 1 commit into
mainfrom
feat/returndup-default-on
Jul 5, 2026
Merged

mahaloz merged 1 commit into
mainfrom
feat/returndup-default-on

Conversation

@mahaloz

@mahaloz mahaloz commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Per user directive, flip returndup (angr ReturnDuplicatorHigh, decbench F4, merged default-off in #124) to default-ON (DIV-18).

Duplicates a shared bare-epilogue RETURN block into each predecessor so the classic O0 guard shape if (cond) { body; return X; } return Y; recovers as per-predecessor early returns instead of one merged comma-folded short-circuit exit (coreutils factor GED 12→0; closes the ghidra-beats-kuna compspec_dispose shape).

Corpus impact — broad but correct, kept byte-identical via opt-outs

Unlike the 0/675 flags, returndup changes broad O0 early-return rendering, so parity is preserved by per-test opt-outs (no baseline re-pin):

  • 16 datatest files carry <com>option returndup off</com> → docs/baseline.json byte-identical (bitfields, bitfields2, boolless, ccmp, condconst, condconst2, condexesub, condmulti, copytrim, multiret, orcompare, partialunion, pointerrel, skipnext2, statuscmp, union_datatype).
  • 8 stage tests get the same opt-out in their DIV-flags-off baseline preamble.
  • 4 golden Rust byte-tests (print_b5_boolless, verify_w10_merge_casts, verify_w10_implied_vars_adversarial, verify_w10_condexe_structure_adversarial) pin arch.duplicate_shared_returns = false in their render harness — they assert upstream-parity output, orthogonal to return duplication.

stages.toml default off→on + use_when updated; stage_catalog.json regenerated (default "on"); DIV-18 entry. --option returndup off reverts to the upstream merged short-circuit form per function.

Gates (verified by the coordinator)

  • make test — 675/675 PARITY OK (byte-identical via opt-outs)
  • make test-stages — 254/254 PARITY OK
  • make rust-test — green

🤖 Generated with Claude Code

https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J

Per user directive, ship returndup (angr ReturnDuplicatorHigh, decbench F4) default-on:
duplicate a shared bare-epilogue RETURN into each predecessor so O0 early-return guard
shapes recover (coreutils factor GED 12->0; closes ghidra-beats-kuna compspec_dispose).

Corpus impact (unlike the 0/675 flags, returndup changes broad O0 early-return rendering):
- 16 datatest files carry a per-test <com>option returndup off</com> opt-out keeping
  docs/baseline.json byte-identical (bitfields, bitfields2, boolless, ccmp, condconst,
  condconst2, condexesub, condmulti, copytrim, multiret, orcompare, partialunion,
  pointerrel, skipnext2, statuscmp, union_datatype).
- 8 stage tests get the same opt-out in their DIV-flags-off baseline preamble.
- 4 golden Rust byte-tests (print_b5_boolless, verify_w10_merge_casts,
  verify_w10_implied_vars_adversarial, verify_w10_condexe_structure_adversarial) pin
  arch.duplicate_shared_returns=false in their render harness — they assert upstream-parity
  output, orthogonal to return duplication.
stages.toml default off->on + use_when updated; stage_catalog.json regenerated (default on);
DIV-18. --option returndup off reverts to the upstream merged short-circuit form.

Gates: make test 675/675 PARITY OK, make test-stages 254/254 PARITY OK.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018DV2MXxQAAWK7xLPBmsq9J
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.

1 participant