-
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
Crashes on Apple Silicon #2033
Comments
Yes, exactly. You are nesting uc_emu_start, which could potentially leads to this crash. Temporary workaround is not calling uc_emu_start in any callbacks. |
Thanks, I understand. Do you have any plans to solve this problem in the future? Additionally, there may be problem with the dylib provided in the wheel, as it cannot even run the most basic samples in my environment.
|
This is easy to solve if you could provide a smaller reproduction. Usually just we forget to save/restore JIT status before entering JIT regions.
I have no idea about this. The building environment should be the same or there might be Github Action bugs. Again, we need a reproduction to locate this issue. But we will soon test the shipped wheel before distribution in #2026 |
I will find a way to simply reproduce it. |
The second issue will occur to |
Full script? |
|
That works on my mbp. Are you on dev branch and what error do you get? |
I just installed unicorn using pip in a project that only has sample_arm64.
The crash log is:
|
If I use locally compiled dylib, this problem would not occur. |
I have no idea why the built dynamic libraries by Github Action is failed but #2026 will surely address this by testing the wheels before uploading to pypi. This will be shipped along with 2.1.2, probably before the end of this month. Locally testing shows that probably the JIT state is not switched but no idea why. |
I have found a solution to the first problem, remove a judgment condition in
=>
After this, my program can work normally. Meanwhile, I noticed that this judgment condition was specifically added by you in the commit. |
This would fail other cases. I remember I added corresponding cases and you can run ctest to check. Generally, the root cause is that we allow users to re-entry the JIT area and the area is shared all together. It’s hard to determine the correct state given current design. |
ctest all passed.
There are two judgment conditions in your commit, removing the condition in |
I can't remember the exact context of this commit and I will have a check. By the way, could have a try with the wheel from here: https://github.com/unicorn-engine/unicorn/actions/runs/11385747394 (note artifacts below) |
I use Unicorn to emulate iOS executable file. It works normally on Windows, Linux, and macOS x86, but crashes on Apple Silicon (Not all scenes will crash, but they can be stably reproduced).
The environment I am using is macOS 14.2 with M3 pro.
The error message is:
The crash log is:
I noticed this crash log is similar to stackoverflow, so I guess it may also be due to the same reason.
Reproduce this issue:
The text was updated successfully, but these errors were encountered: