-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 |
I meet the same problem,the platform is android arm64 with c code and the target arch is arm64. I try the patch of saicao ,but not solve my problem. Is anyone solve this problem? @wtdcode |
I try dev branch ,but the problem is still exist. |
patch of saicao is work but the dev branch dont |
Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]>
Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]>
Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]>
Directly jump into the slow path when there is any hookmem enabled. This fixes unicorn-engine#1908. Signed-off-by: Glenn Baker <[email protected]>
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: