Skip to content

fix: open built-in chains on reads by unproven keys; no IIFE parameter binding for self-referencing named functions - #468

Merged
Sorte1 merged 6 commits into
mainfrom
fix/rx11-proto-reach
Nov 21, 2026
Merged

Sorte1 merged 6 commits into
mainfrom
fix/rx11-proto-reach

Conversation

@Sorte1

@Sorte1 Sorte1 commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Fixes the two CRITICAL default-lane findings of review/r6-a25rr9.md and finding 2 of review/r6-ml7.md.

  • A computed read, computed pattern key or .get(o, k) call whose key is not proven safe now opens the built-in chains when its value is kept. A key is safe when it is numeric, enumerated, a resolved name other than __proto__/prototype/constructor, a parameter overwritten with a number earlier in the same body, a parameter that only receives safe keys from direct calls, or an unset variable written only with numbers. Reads that are only tested, compared, coerced (relied built-ins intact) or called with the result dropped do not count. The same walk feeds the cross-input scan, so a prototype patched through such a key in one input stops folds in the others.
  • A named function expression called in place no longer binds its parameters to the call's arguments when its name is referenced.
  • The notes test decoder now shifts its index like the obfuscator.io decoder it stands for; the unshifted form is now refused earlier for a different reason.

Rows: crates/untwist/tests/data/rename_a25rr (rx11-, q-rx11-). r5 fin/t1-t32, m2/m3, m2/m4 and all r6 a/b/c rows match node under no flags, --rename smart, --rename mangle; --unsafe differences are only the prototype-patch rows inside its premise. r6-ml7 n4/n6: 0 default-lane differences.

Gates: full sweep 0 worse in either lane, Krunker and game.js byte-identical in both lanes and with both renames, BASELINEs unchanged, wasm 16,468,378 bytes, local untwist-ci green.

…d no parameter of a self-referencing named function from its call

A computed read, a computed pattern key or a .get call whose key is not
proven numeric, enumerated or a resolved name other than __proto__,
prototype and constructor now counts as obtaining a built-in prototype.
This also feeds the cross-input built-in scan, so an input that patches
a prototype through such a key stops folds in the other inputs.

A function expression called in place binds its parameters to the call's
arguments only when its own name is never referenced.
… prove keys from unset numeric variables

A read whose value is only tested, compared, coerced while the relied
built-ins are intact, or called with the result dropped cannot hand out
a prototype. The notes test decoder now shifts its index like the
obfuscator.io decoder it stands for.
@Sorte1
Sorte1 force-pushed the fix/rx11-proto-reach branch from c2533cc to d25acae Compare November 20, 2026 23:46
@Sorte1
Sorte1 merged commit e466ad6 into main Nov 21, 2026
9 checks passed
@Sorte1
Sorte1 deleted the fix/rx11-proto-reach branch November 21, 2026 00:10

This branch was successfully deployed

1 active deployment
preview — d25acaea Deployed Nov 20, 2026 by Sorte1 via deploy #1370
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