-
Notifications
You must be signed in to change notification settings - Fork 8
Unicorn stops emulation when PC = 0x00 #16
Comments
Hi @domenukk ! Thank you very much again for your effort. I have tried it, but unfortunately the problem remains, although in a different way from my original post. The emulator still does not execute any instructions. However, instead of simply terminating, it hangs in an infinite loop. I will try to code a minimum working example so you can experience what happens to me. Due to time constraints, I can't get my hands on the code myself to solve the problem in an elegant way... However, in case it helps, I'm using locally this little workaround:
It is strange because 8a217c5 does not solve it despite being the same idea of setting |
What arch are you emulating? |
Yeah... Cheers |
Next try, 1f10035 - now it definitely shouldn't have issues with |
Hi @domenukk I tried 1f10035, but the issue still remains. I have modified the arm sample present in this repo to get an example to show the bug. Here is the patch:
What I am experiencing is that Please, ask me any further information if you need it. I can put here a small Dockerfile to reproduce exactly the environment I am using for this. For AFLplusplus, I am cloning branch 3.12c commit Thanks again for your time. |
I forgot to mention that all these cases are "solved" with the workaround of |
I'm a bit confused, imho it should work now (and not loop infinitely)... The patch in |
Hello,
I recently opened an issue in the Unicorn repository (unicorn-engine#1383), but I believe my problem comes from the AFLplusplus implementation.
My problem is that when I emulate ARM code, unicorn stops when the address 0 is reached.
I tried calling directly to unicorn with
uc_emu_start(uc, start_addr, 0, 0, 0)
and I got the same behavior, but then callinguc_emu_start(uc, start_addr, 0x12345678, 0, 0)
it did NOT stopped at 0x0.My guess is that
uc_afl_emu_start()
is eventually passing 0 as third parameter (until
) and that's why the emulation stopped. However, I tried to identify that code in the source without success. I see thatuc_afl_emu_start()
executesuc->vm_start(uc)
, which if I am not mistaken, is inqemu/cpus.c:44
.I naively expected to find a call like
uc_emu_start(uc, addr, 0, xx, xx)
.I would like to ask you, how can I prevent AFLplusplus to stop emulation at address 0?
My new guess is that
addr_end
withinstruct uc_struct
is zero. If that's the case, I can't find a way to modify that variable from the outside since its definition is not exposed.Thank you in advance and congratulations for the great work done on this project, it is really impressive and useful.
The text was updated successfully, but these errors were encountered: