Repository navigation
fix: keep aliases of a decoder written outside its body - #488
Merged
Merged
Conversation
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.
…es with the alias write check
This branch was successfully deployed
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.
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 = dself-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.