Skip to content

Reuse instruction-flow lift storage within each decoding worker - #1613

Merged
gmh5225 merged 2 commits into
devfrom
codex/reuse-instruction-flow-storage
Oct 21, 2026
Merged

gmh5225 merged 2 commits into
devfrom
codex/reuse-instruction-flow-storage

Conversation

@Letenz

@Letenz Letenz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Full-image reference and access-width sweeps constructed and released a LowOp vector for each instruction. Give each decoding worker a private scratch vector and reuse only its capacity across instructions. Disassembly pages use a call-local workspace; reference, string-reference and width scans use the same summarizer.

Every instruction still clears operations and resets x87 state, including after an unsupported lift. Results own their references and transfer facts. There is no shared mutable scratch, TLS cache, smaller scan scope or unsupported-instruction shortcut.

The SDK regression uses independent load/NOP/return and store/NOP/return sequences: trailing instructions must not inherit references, repeated reads must agree, and conflicting access widths remain unknown. A real CLI/worker test generates two-function and multi-page ELF fixtures, checks every reference against the encoded instruction addresses, and verifies 4/8-byte widths and complete pagination. It needs no external binary or fixture compiler.

Before rebasing onto current dev, three paired Windows Release SDK runs with the reusable-page-index baseline reduced first source preparation by about 24%. A single GUI pair improved about 16%; it is recorded as a single observation, not a stable distribution. Input identities, binaries, hashes and raw logs are omitted.

Windows x64 Release: 11 focused SDK cases passed without skips. The registered NeverDWorkerCLIInstructionFlow test passed with freshly linked CLI/worker products, including both synthetic inventory sizes, repeated CLI reads and complete worker paging. The modified C++ ranges and diff whitespace were checked. Full CTest and native Linux/macOS host runs were not performed locally. This PR targets dev independently of the address-order cache and applies to the shared SDK used by CLI and GUI.

Letenz and others added 2 commits October 21, 2026 18:35
…n-flow-storage

Dev's unsized-body reader and call graph decode through decodeFunctions.
Both now take the decoding worker's InstructionFlowScratch, so they build
against the four-argument visitor and reuse the same lift storage.
@gmh5225
gmh5225 merged commit 97084ee into dev Oct 21, 2026
5 of 11 checks passed
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.

3 participants