Skip to content

Expose the Sleigh decode-cache reset safely - #19

Open
0verflowme wants to merge 1 commit into
mnemonikr:mainfrom
0verflowme:clear-cache
Open

Expose the Sleigh decode-cache reset safely#19
0verflowme wants to merge 1 commit into
mnemonikr:mainfrom
0verflowme:clear-cache

Conversation

@0verflowme

Copy link
Copy Markdown

Why

A long-lived Sleigh decoder must invalidate address-keyed parser state before bytes at an address can change. Otherwise a later disassembly can return the first instruction decoded there.

What

Add the fallible Sleigh::clear_cache API and retain the processor specification needed by the bridge reset. The regression decodes mov al, bl, clears the cache, then proves mov ah, bl at the same address observes the new bytes.

Depends on mnemonikr/libsla-sys#9.

Validation

  • cargo fmt --all -- --check
  • cargo test with libsla-sys#9 patched into the dependency graph

A long-lived decoder needs to invalidate address-keyed parser state before bytes at an address can change. Retain the processor specification for the bridge reset and prove that a reused address observes the new instruction.
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