Skip to content

fix: preserve mmio state on failed unmap - #12

Merged
wtdcode merged 1 commit into
unicorn-engine:mainfrom
Jvlegod:fix/mmio-unmap-error-state
Sep 9, 2026
Merged

wtdcode merged 1 commit into
unicorn-engine:mainfrom
Jvlegod:fix/mmio-unmap-error-state

Conversation

@Jvlegod

@Jvlegod Jvlegod commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

This PR fix mem_unmap so MMIO callback regions are only updated after uc_mem_unmap succeeds.

For example: if we map a region (0x3000, 0x1000).

Before fix:

before unmap: [(0x3000, 0x1000)]
unmap result: Err(ARG)
after unmap: [(0x3800, 0x800)]

After fix:

before unmap: [(0x3000, 0x1000)]
unmap result: Err(ARG)
after unmap: [(0x3000, 0x1000)]

Signed-off-by: Jvle <keke.oerv@isrc.iscas.ac.cn>
@Jvlegod
Jvlegod force-pushed the fix/mmio-unmap-error-state branch from f8c2e4c to ba3459f Compare August 9, 2026 16:44
@wtdcode

wtdcode commented Aug 28, 2026

Copy link
Copy Markdown
Member

Sorry for late. This looks good to me.

@wtdcode
wtdcode merged commit 51d2888 into unicorn-engine:main Sep 9, 2026
4 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.

2 participants