Skip to content

fix: keep aliases of a decoder written outside its body - #488

Merged
Sorte1 merged 4 commits into
mainfrom
fix/ox3-a3
Nov 22, 2026
Merged

Sorte1 merged 4 commits into
mainfrom
fix/ox3-a3

Conversation

@Sorte1

@Sorte1 Sorte1 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Fixes F1 from the round 9 review of #482 (review/r9-ox3a2.md).

Since #482 a decoder written outside its body under a comparison guard is stamped. The alias pass then replaced aliases taken before the write (var z = d; ... z(17)) by the decoder name, so the output called the new function when the guard ran. Both lanes printed the wrong thing.

The alias pass now leaves out any stamped decoder with a write outside its own declaration. Two exceptions: a plain d = d self-assignment, and under --unsafe a speculated decoder whose writes are all in branches (the escape stage already defers those and reruns without speculation if a write survives).

Rows: 19 repros from the review in obfuscator_sweep_rows.rs, both lanes against node.

Gates: local untwist-ci green; obfuscator BASELINEs unchanged; Krunker byte-identical in both lanes; full sweep against main 983566e: no verdict changes in either lane.

Known loss: an alias used as the guard's own callee (if (z(0x10) !== 'TyxkK')) is no longer decoded; it is kept and prints like node.

A decoder written under a comparison guard is stamped since #482, but an
alias taken before the write holds the old function. The alias pass now
leaves such decoders out of its targets.
Their branch writes are deferred and checked by the escape stage, which
reruns without speculation when a write survives.
A plain d = d leaves the binding unchanged, so it is not a write that
makes an alias differ from the decoder.
@Sorte1
Sorte1 merged commit ac1fe80 into main Nov 22, 2026
9 checks passed
@Sorte1
Sorte1 deleted the fix/ox3-a3 branch November 22, 2026 00:25

This branch was successfully deployed

1 active deployment
preview — 12144784 Deployed Nov 22, 2026 by Sorte1 via deploy #1425
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