New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UC_HOOK_MEM_READ only triggered once (x86 64 emulated on mac M1) #1908
Comments
I meet the same problem on M2 pro. I test arm64 arch |
Verified the read operations are inlined. Arm64 backend tends to inline read/write operations. See: https://github.com/unicorn-engine/unicorn/wiki/FAQ#memory-hooks-are-skipped
|
Same problem here, M2 :( |
I'm emulating UC_ARCH_ARM/UC_CPU_ARM_CORTEX_M4 and on Mac M1 host, and I'm not seeing UC_MEM_READ events. |
you may try this, not tested full functionalities , since I only need the address and value of reads. |
@saicao Would you like to submit a PR for that?
…________________________________
From: SAI ***@***.***>
Sent: Friday, April 12, 2024 11:23:13 AM
To: unicorn-engine/unicorn ***@***.***>
Cc: lazymio ***@***.***>; Comment ***@***.***>
Subject: Re: [unicorn-engine/unicorn] UC_HOOK_MEM_READ only triggered once (x86 64 emulated on mac M1) (Issue #1908)
you may try this, not tested full functionalities , since I only need the address and value of reads.
***@***.***<saicao@026f4c4>
@keroblabs<https://github.com/keroblabs>
―
Reply to this email directly, view it on GitHub<#1908 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHJULO4YKUHK5KBRAGYLUUTY45HSDAVCNFSM6AAAAAA7MLCXI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQHA4TMMRXGA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
@saicao |
Hello,
Description
I'm facing a strange issue where my UC_HOOK_MEM_READ is only called the first time a memory read is encountered.
All subsequent reads do not trigger the callback.
Setup
Unicorn has been compiled as per recommendations in the documentation.
Unicorn python bindings were installed in a fresh python venv.
Test case
Test case output
As can be seen above,
hook_mem_access
is only called once for READ while it is expected to be called 10 times.Strangely, this does not affect writes.
The text was updated successfully, but these errors were encountered: