8000
Skip to content

Update to the latest ZyDis ##build - #26313

Open
trufae wants to merge 1 commit into
masterfrom
zydisup
Open

Update to the latest ZyDis ##build#26313
trufae wants to merge 1 commit into
masterfrom
zydisup

Conversation

@trufae
@trufae trufae commented Jul 21, 2026
Copy link
Copy Markdown
Collaborator
  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

Copilot AI review requested due to automatic review settings July 21, 2026 08:31
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the bundled Zydis integration (and related build/test scaffolding) to a newer 5.x development snapshot, aligning radare2’s x86.zydis plugin and expected analysis output with upstream changes.

Changes:

  • Switch Meson wrap from a fixed 4.1.0 amalgamated tarball to a pinned Zydis git revision.
  • Update the x86 Zydis plugin to handle the Zydis 5 displacement field change (mem.disp.has_displacementmem.disp.size).
  • Refresh bundled Zydis amalgamated headers/patch metadata and adjust the corresponding analyzer test expectations.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/db/anal/x86_zydis Updates expected aoj JSON output to match the new Zydis snapshot.
subprojects/zydis.wrap Moves from wrap-file tarball to a pinned wrap-git checkout of Zydis.
subprojects/packagefiles/zydis/zydis-patches/unused-rex-token-aliases.patch Updates patch hunk offsets to match the regenerated amalgamated source.
subprojects/packagefiles/zydis/README.radare2 Documents the new Zydis commit snapshot and how to regenerate amalgamated-dist.
subprojects/packagefiles/zydis/meson.build Bumps embedded subproject version metadata to 5.0.0.
subprojects/packagefiles/zydis/amalgamated-dist/Zydis.h Updates vendored amalgamated header to Zydis 5 snapshot (new enums/fields/APX support, etc.).
libr/arch/p/x86/plugin_zydis.c Adapts plugin logic for Zydis 5 displacement representation.
dist/nix/package.nix Adjusts Nix packaging to use the vendored Zydis packagefiles directory rather than a fetched tarball.

Comment thread libr/arch/p/x86/plugin_zydis.c Outdated
Comment thread subprojects/zydis.wrap Outdated
lead_directory_missing = true
patch_directory = zydis No newline at end of file
patch_directory = zydis
depth = 1
@@ -7802,6 +8306,14 @@ typedef struct ZydisEncoderRequest_
* Specify `ZYAN_TRUE` for instructions with forced zeroing mask.
*/
ZyanBool zeroing_mask;
/**
* Supress status flags update for certain `APX` instructions.
Comment on lines +8310 to +8312
* Supress status flags update for certain `APX` instructions.
*/
ZyanBool no_flags;
Copilot AI review requested due to automatic review settings July 21, 2026 10:59
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

subprojects/packagefiles/zydis/amalgamated-dist/Zydis.h:8310

  • Typo in comment: "Supress" should be "Suppress".
         * Supress status flags update for certain `APX` instructions.

Comment thread libr/arch/p/x86/plugin_zydis.c Outdated
Comment on lines +17 to +21
#if defined(ZYDIS_DECODER_MODE_APX)
#define HAS_MEM_DISP(op) ((op)->mem.disp.size != 0)
#else
#define HAS_MEM_DISP(op) ((op)->mem.disp.has_displacement)
#endif
@trufae
trufae commented Aug 6, 2026
Copy link
Copy Markdown
Collaborator Author

treat the vendoring as temporary: when v5 tags, swap the in-tree copy back to a wrap. You gain APX decoding and network-free builds now, at the cost of a few MB of git history that stays forever even after reverting.

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

0