Skip to content
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

macos 运行demo报错 #82

Closed
kingking888 opened this issue Jun 29, 2024 · 12 comments
Closed

macos 运行demo报错 #82

kingking888 opened this issue Jun 29, 2024 · 12 comments

Comments

@kingking888
Copy link

2024-06-29 10:35:35,039 - main - INFO: Call symbol "__ZL9protocolsv"
2024-06-29 10:35:35,039 - main - INFO: Start emulate at libobjc.A.dylib!0x1947fb630
2024-06-29 10:35:35,051 - main - INFO: Call symbol "__objc_init"
2024-06-29 10:35:35,052 - main - INFO: Start emulate at libobjc.A.dylib!0x19480ae0c
Traceback (most recent call last):
File "/Users/kingking/Working/PycharmWorkPlace/reverse/IOS/chomper/examples/example_ios_bangbang.py", line 48, in
main()
File "/Users/kingking/Working/PycharmWorkPlace/reverse/IOS/chomper/examples/example_ios_bangbang.py", line 21, in main
emu = Chomper(
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 98, in init
self.os.initialize()
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/os/ios/os.py", line 293, in initialize
self._enable_objc()
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/os/ios/os.py", line 259, in _enable_objc
self.resolve_modules(dependencies)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/os/ios/os.py", line 230, in resolve_modules
self.init_objc(module)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/os/ios/os.py", line 156, in init_objc
self._init_objc_vars()
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/os/ios/os.py", line 140, in _init_objc_vars
self.emu.call_symbol("__objc_init")
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 745, in call_symbol
return self._start_emulate(address, *args)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate
self.uc.emu_start(address, stop_addr)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/unicorn/unicorn.py", line 550, in emu_start
raise self._hook_exception
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/unicorn/unicorn.py", line 392, in wrapper
return func(self, *args, **kwargs)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/unicorn/unicorn.py", line 681, in _hook_intr_cb
cb(self, intno, data)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 439, in _interrupt_callback
AutomicInstruction(self, code).execute()
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/instruction.py", line 19, in init
self._inst = next(self.emu.cs.disasm_lite(code, 0))
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/capstone/init.py", line 1077, in disasm_lite
res = _cs.cs_disasm(self.csh, code, len(code), offset, count, ctypes.byref(all_insn))
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

@sledgeh4w
Copy link
Owner

这个是 captsone 版本的问题,你现在应该是 4.x ,可以升级到 5.x 。

@kingking888
Copy link
Author

kingking888 commented Jun 29, 2024

Installing collected packages: capstone
Attempting uninstall: capstone
Found existing installation: capstone 4.0.1
Uninstalling capstone-4.0.1:
Successfully uninstalled capstone-4.0.1
Successfully installed capstone-5.0.1

可以正常跑起来了,但是最后还是报了错

2024-06-30 00:17:18,366 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-06-30 00:17:18,366 - main - INFO: Call symbol "_objc_autoreleasePoolPop"
2024-06-30 00:17:18,366 - main - INFO: Start emulate at libobjc.A.dylib!0x19480f380
Traceback (most recent call last):
File "/Users/kingking/Working/PycharmWorkPlace/reverse/IOS/chomper/examples/example_ios_ijm.py", line 60, in
main()
File "/Users/kingking/Working/PycharmWorkPlace/reverse/IOS/chomper/examples/example_ios_ijm.py", line 50, in main
logger.info("Encrypt result: %s", emu.read_string(objc.msg_send(encrypt_result, "cStringUsingEncoding:", 4)))
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 646, in read_string
byte = self.read_bytes(address + offset, 1)
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/chomper/core.py", line 638, in read_bytes
return bytes(self.uc.mem_read(address, size))
File "/Users/kingking/opt/anaconda3/envs/reverse/lib/python3.8/site-packages/unicorn/unicorn.py", line 579, in mem_read
raise UcError(status)
unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

@sledgeh4w
Copy link
Owner

lief 这个库的版本也需要升到 14.0.1 。

@kingking888
Copy link
Author

Installing collected packages: lief
Attempting uninstall: lief
Found existing installation: lief 0.13.2
Uninstalling lief-0.13.2:
Successfully uninstalled lief-0.13.2
Successfully installed lief-0.14.1

非常感谢大佬指导,终于跑起来了

@hedada-hc
Copy link

报错了版本都是你指定的那些版本
2024-07-10 14:07:31,836 - main - INFO: Load module "TextInput"
2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_MGCopyAnswer" at 0x1d20560a0
2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_calloc" at 0x1d2056170
2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_dispatch_async" at 0x1d2056190
2024-07-10 14:07:34,399 - main - INFO: Call symbol "_map_images"
2024-07-10 14:07:34,399 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-07-10 14:07:34,476 - main - INFO: Call symbol "_load_images"
2024-07-10 14:07:34,477 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac
2024-07-10 14:07:34,480 - main - INFO: Load module "PhysicsKit"
2024-07-10 14:07:34,972 - main - INFO: Call symbol "_map_images"
2024-07-10 14:07:34,972 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-07-10 14:07:34,983 - main - INFO: Call symbol "_load_images"
2024-07-10 14:07:34,984 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac
2024-07-10 14:07:34,985 - main - INFO: Load module "CoreAutoLayout"
2024-07-10 14:07:35,276 - main - INFO: Hook import symbol "_calloc" at 0x1d3d3fa00
2024-07-10 14:07:35,277 - main - INFO: Hook import symbol "_malloc_good_size" at 0x1d3d3fa50
2024-07-10 14:07:35,352 - main - INFO: Call symbol "_map_images"
2024-07-10 14:07:35,353 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-07-10 14:07:35,372 - main - INFO: Call symbol "_load_images"
2024-07-10 14:07:35,373 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac
2024-07-10 14:07:35,374 - main - INFO: Load module "UIFoundation"
2024-07-10 14:07:36,581 - main - INFO: Hook import symbol "_calloc" at 0x1d296b018
2024-07-10 14:07:36,581 - main - INFO: Hook import symbol "_pthread_rwlock_rdlock" at 0x1d296b2b0
2024-07-10 14:07:36,582 - main - INFO: Hook import symbol "_pthread_rwlock_unlock" at 0x1d296b2c0
2024-07-10 14:07:36,867 - main - INFO: Call symbol "_map_images"
2024-07-10 14:07:36,868 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-07-10 14:07:36,926 - main - INFO: Backtrace: libobjc.A.dylib!0x1947f9140, libobjc.A.dylib!0x1947f913c, libobjc.A.dylib!0x194809c3c, libobjc.A.dylib!0x1947f9e28
2024-07-10 14:07:36,927 - main - INFO: State: x0: 0x00000001da4b1da8 [libc++abi.dylib!0x1b928bda8], x1: 0x0000000000000000, x2: 0x0000000000000000, x3: 0x0000000000077e98, x4: 0x0000000000000000, x5: 0x0000000000000000, x6: 0x0000000000000000, x7: 0x0000000000000000, x8: 0x0000000000000000, x9: 0x0000000000000000, x10: 0x0000000008150000, x11: 0x0000000000002000, x12: 0x0000000000001fff, x13: 0x0000000000000fbf, x14: 0x0000000000000000, x15: 0xffffffffffffffff, x16: 0x0000000000000001, x17: 0x0000000000000000, x18: 0x0000000000000000, x19: 0x0000000821a9d1a0 [UIFoundation!0x1d9a681a0], x20: 0x0000000000000000, x21: 0x00000008224e6878 [UIFoundation!0x1da4b1878], x22: 0x0000000821a9d1c0 [UIFoundation!0x1d9a681c0], x23: 0x0000000000000000, x24: 0x00000002afe30ef9 [libobjc.A.dylib!0x19481aef9], x25: 0x000000081a9b3cf0 [UIFoundation!0x1d297ecf0], x26: 0x0000000000000000, x27: 0x0000000000000069, x28: 0x0000000821a9d1a0 [UIFoundation!0x1d9a681a0], x29: 0x0000000000077ec0, x30: 0x00000002afe0f140 [libobjc.A.dylib!0x1947f9140]
2024-07-10 14:07:36,927 - main - ERROR: Initialize Objective-C failed.
2024-07-10 14:07:36,927 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 210, in _start_emulate
self.uc.emu_start(address, stop_addr)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unicorn/unicorn.py", line 547, in emu_start
raise UcError(status)
unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/os/ios/os.py", line 176, in init_objc
self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 745, in call_symbol
return self._start_emulate(address, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 215, in _start_emulate
self.crash("Unknown reason", from_exc=e)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 381, in crash
raise EmulatorCrashedException(message) from from_exc
chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140
2024-07-10 14:07:36,930 - main - INFO: Load module "UIKitServices"
2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_MGCopyAnswer" at 0x1d210a1a8
2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_dispatch_async" at 0x1d210a218
2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_notify_register_dispatch" at 0x1d210a2a8
2024-07-10 14:07:37,214 - main - INFO: Call symbol "_map_images"
2024-07-10 14:07:37,214 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-07-10 14:07:37,225 - main - INFO: Call symbol "_load_images"
2024-07-10 14:07:37,226 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac

@sledgeh4w
Copy link
Owner

报错了版本都是你指定的那些版本 2024-07-10 14:07:31,836 - main - INFO: Load module "TextInput" 2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_MGCopyAnswer" at 0x1d20560a0 2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_calloc" at 0x1d2056170 2024-07-10 14:07:34,184 - main - INFO: Hook import symbol "_dispatch_async" at 0x1d2056190 2024-07-10 14:07:34,399 - main - INFO: Call symbol "_map_images" 2024-07-10 14:07:34,399 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-07-10 14:07:34,476 - main - INFO: Call symbol "_load_images" 2024-07-10 14:07:34,477 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac 2024-07-10 14:07:34,480 - main - INFO: Load module "PhysicsKit" 2024-07-10 14:07:34,972 - main - INFO: Call symbol "_map_images" 2024-07-10 14:07:34,972 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-07-10 14:07:34,983 - main - INFO: Call symbol "_load_images" 2024-07-10 14:07:34,984 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac 2024-07-10 14:07:34,985 - main - INFO: Load module "CoreAutoLayout" 2024-07-10 14:07:35,276 - main - INFO: Hook import symbol "_calloc" at 0x1d3d3fa00 2024-07-10 14:07:35,277 - main - INFO: Hook import symbol "_malloc_good_size" at 0x1d3d3fa50 2024-07-10 14:07:35,352 - main - INFO: Call symbol "_map_images" 2024-07-10 14:07:35,353 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-07-10 14:07:35,372 - main - INFO: Call symbol "_load_images" 2024-07-10 14:07:35,373 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac 2024-07-10 14:07:35,374 - main - INFO: Load module "UIFoundation" 2024-07-10 14:07:36,581 - main - INFO: Hook import symbol "_calloc" at 0x1d296b018 2024-07-10 14:07:36,581 - main - INFO: Hook import symbol "_pthread_rwlock_rdlock" at 0x1d296b2b0 2024-07-10 14:07:36,582 - main - INFO: Hook import symbol "_pthread_rwlock_unlock" at 0x1d296b2c0 2024-07-10 14:07:36,867 - main - INFO: Call symbol "_map_images" 2024-07-10 14:07:36,868 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-07-10 14:07:36,926 - main - INFO: Backtrace: libobjc.A.dylib!0x1947f9140, libobjc.A.dylib!0x1947f913c, libobjc.A.dylib!0x194809c3c, libobjc.A.dylib!0x1947f9e28 2024-07-10 14:07:36,927 - main - INFO: State: x0: 0x00000001da4b1da8 [libc++abi.dylib!0x1b928bda8], x1: 0x0000000000000000, x2: 0x0000000000000000, x3: 0x0000000000077e98, x4: 0x0000000000000000, x5: 0x0000000000000000, x6: 0x0000000000000000, x7: 0x0000000000000000, x8: 0x0000000000000000, x9: 0x0000000000000000, x10: 0x0000000008150000, x11: 0x0000000000002000, x12: 0x0000000000001fff, x13: 0x0000000000000fbf, x14: 0x0000000000000000, x15: 0xffffffffffffffff, x16: 0x0000000000000001, x17: 0x0000000000000000, x18: 0x0000000000000000, x19: 0x0000000821a9d1a0 [UIFoundation!0x1d9a681a0], x20: 0x0000000000000000, x21: 0x00000008224e6878 [UIFoundation!0x1da4b1878], x22: 0x0000000821a9d1c0 [UIFoundation!0x1d9a681c0], x23: 0x0000000000000000, x24: 0x00000002afe30ef9 [libobjc.A.dylib!0x19481aef9], x25: 0x000000081a9b3cf0 [UIFoundation!0x1d297ecf0], x26: 0x0000000000000000, x27: 0x0000000000000069, x28: 0x0000000821a9d1a0 [UIFoundation!0x1d9a681a0], x29: 0x0000000000077ec0, x30: 0x00000002afe0f140 [libobjc.A.dylib!0x1947f9140] 2024-07-10 14:07:36,927 - main - ERROR: Initialize Objective-C failed. 2024-07-10 14:07:36,927 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 210, in _start_emulate self.uc.emu_start(address, stop_addr) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unicorn/unicorn.py", line 547, in emu_start raise UcError(status) unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/os/ios/os.py", line 176, in init_objc self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 745, in call_symbol return self._start_emulate(address, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 215, in _start_emulate self.crash("Unknown reason", from_exc=e) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chomper/core.py", line 381, in crash raise EmulatorCrashedException(message) from from_exc chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140 2024-07-10 14:07:36,930 - main - INFO: Load module "UIKitServices" 2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_MGCopyAnswer" at 0x1d210a1a8 2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_dispatch_async" at 0x1d210a218 2024-07-10 14:07:37,182 - main - INFO: Hook import symbol "_notify_register_dispatch" at 0x1d210a2a8 2024-07-10 14:07:37,214 - main - INFO: Call symbol "_map_images" 2024-07-10 14:07:37,214 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-07-10 14:07:37,225 - main - INFO: Call symbol "_load_images" 2024-07-10 14:07:37,226 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac

这个报错目前属于正常情况,一般不会影响最终结果,最终执行结果有报错吗

@sailor-fly
Copy link

m1 macos 运行 example中的example_ios_ali_vmp_sign.py,报如下错,没有结果输出,依赖环境如下:
Package Version


capstone 5.0.3
chomper 0.3.2
importlib-resources 6.4.4
lief 0.15.1
pip 21.1.2
pyelftools 0.31
setuptools 57.0.0
unicorn 2.0.1.post1
wheel 0.36.2
zipp 3.20.0

2024-08-22 14:51:41,813 - main - ERROR: Initialize Objective-C failed.
2024-08-22 14:51:41,813 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140
Traceback (most recent call last):
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate
self.uc.emu_start(address, stop_addr)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/unicorn/unicorn.py", line 547, in emu_start
raise UcError(status)
unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/os/ios/os.py", line 166, in init_objc
self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 758, in call_symbol
return self._start_emulate(address, *args)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 215, in _start_emulate
self.crash("Unknown reason", from_exc=e)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 381, in crash
raise EmulatorCrashedException(message) from from_exc
chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140

@sledgeh4w
Copy link
Owner

m1 macos 运行 example中的example_ios_ali_vmp_sign.py,报如下错,没有结果输出,依赖环境如下: Package Version

capstone 5.0.3 chomper 0.3.2 importlib-resources 6.4.4 lief 0.15.1 pip 21.1.2 pyelftools 0.31 setuptools 57.0.0 unicorn 2.0.1.post1 wheel 0.36.2 zipp 3.20.0

2024-08-22 14:51:41,813 - main - ERROR: Initialize Objective-C failed. 2024-08-22 14:51:41,813 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140 Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate self.uc.emu_start(address, stop_addr) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/unicorn/unicorn.py", line 547, in emu_start raise UcError(status) unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/os/ios/os.py", line 166, in init_objc self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 758, in call_symbol return self._start_emulate(address, *args) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 215, in _start_emulate self.crash("Unknown reason", from_exc=e) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 381, in crash raise EmulatorCrashedException(message) from from_exc chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140

最终的日志停留在哪呢,这个报错目前是正常的,不会中断执行

@sailor-fly
Copy link

2024-08-22 16:43:52,615 - main - INFO: Backtrace: libobjc.A.dylib!0x1947f9140, libobjc.A.dylib!0x1947f913c, libobjc.A.dylib!0x194809c3c, libobjc.A.dylib!0x1947f9e28
2024-08-22 16:43:52,615 - main - INFO: State: x0: 0x00000001da44b5c0 [libc++abi.dylib!0x1b92255c0], x1: 0x0000000000000000, x2: 0x0000000000000000, x3: 0x00000000080fffc0, x4: 0x00000000080e0080, x5: 0x0000000000000000, x6: 0x0000000000000000, x7: 0x00000000000006a0, x8: 0x0000000000000000, x9: 0x0000000000000010, x10: 0x0000000008100000, x11: 0x0000000000004000, x12: 0x0000000000003fff, x13: 0x00000000000007a5, x14: 0x0000000000000000, x15: 0xffffffffffffffff, x16: 0x0000000000000005, x17: 0x0000000000000000, x18: 0x0000000000000000, x19: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x20: 0x0000000000000000, x21: 0x00000008f69a0710 [UIKitCore!0x1da44a710], x22: 0x00000008f5fb7568 [UIKitCore!0x1d9a61568], x23: 0x0000000000000000, x24: 0x00000002c8430ef9 [libobjc.A.dylib!0x19481aef9], x25: 0x00000008ee388540 [UIKitCore!0x1d1e32540], x26: 0x0000000000000000, x27: 0x0000000000000e19, x28: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x29: 0x0000000000077ec0, x30: 0x00000002c840f140 [libobjc.A.dylib!0x1947f9140]
2024-08-22 16:43:52,615 - main - ERROR: Initialize Objective-C failed.
2024-08-22 16:43:52,615 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140
Traceback (most recent call last):
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate
self.uc.emu_start(address, stop_addr)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/unicorn/unicorn.py", line 547, in emu_start
raise UcError(status)
unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/os/ios/os.py", line 166, in init_objc
self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 758, in call_symbol
return self._start_emulate(address, *args)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 215, in _start_emulate
self.crash("Unknown reason", from_exc=e)
File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 381, in crash
raise EmulatorCrashedException(message) from from_exc
chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140
2024-08-22 16:43:52,629 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,629 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,629 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,630 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,635 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,635 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,635 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,636 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,638 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,638 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,639 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,640 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,640 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,641 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,642 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,642 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,643 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,643 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,644 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,644 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_getClass"
2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54
2024-08-22 16:43:52,645 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,646 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:52,646 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:52,647 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:52,648 - main - INFO: Load module "CSMBP-AppStore-Package"
2024-08-22 16:43:55,155 - main - INFO: Hook import symbol "_calloc" at 0x104f45430
2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_calloc" at 0x104f45430
2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_dispatch_async" at 0x104f45540
2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_malloc_size" at 0x104f45e08
2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_notify_register_dispatch" at 0x104f45ec8
2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_posix_memalign" at 0x104f46150
2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_rdlock" at 0x104f462f8
2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_unlock" at 0x104f46300
2024-08-22 16:43:55,171 - main - INFO: Call symbol "_map_images"
2024-08-22 16:43:55,172 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc
2024-08-22 16:43:56,494 - main - INFO: Call symbol "_load_images"
2024-08-22 16:43:56,495 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac
2024-08-22 16:43:56,637 - main - INFO: Call symbol "_sel_registerName"
2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4
2024-08-22 16:43:56,638 - main - INFO: Call symbol "_objc_msgSend"
2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460
2024-08-22 16:43:56,642 - main - INFO: Call symbol "_CFArrayCreateMutable"
2024-08-22 16:43:56,643 - main - INFO: Start emulate at CoreFoundation!0x1803d9ff4
2024-08-22 16:43:56,644 - main - INFO: Call symbol "_CFStringCreateWithCString"
2024-08-22 16:43:56,645 - main - INFO: Start emulate at CoreFoundation!0x18040e36c
2024-08-22 16:43:56,645 - main - INFO: Call symbol "_CFArrayAppendValue"
2024-08-22 16:43:56,646 - main - INFO: Start emulate at CoreFoundation!0x1803856c4
2024-08-22 16:43:56,647 - main - INFO: Call symbol "_CFStringCreateWithCString"
2024-08-22 16:43:56,648 - main - INFO: Start emulate at CoreFoundation!0x18040e36c
2024-08-22 16:43:56,648 - main - INFO: Call symbol "_CFArrayAppendValue"
2024-08-22 16:43:56,649 - main - INFO: Start emulate at CoreFoundation!0x1803856c4

Process finished with exit code 138 (interrupted by signal 10: SIGBUS)

@sledgeh4w
Copy link
Owner

2024-08-22 16:43:52,615 - main - INFO: Backtrace: libobjc.A.dylib!0x1947f9140, libobjc.A.dylib!0x1947f913c, libobjc.A.dylib!0x194809c3c, libobjc.A.dylib!0x1947f9e28 2024-08-22 16:43:52,615 - main - INFO: State: x0: 0x00000001da44b5c0 [libc++abi.dylib!0x1b92255c0], x1: 0x0000000000000000, x2: 0x0000000000000000, x3: 0x00000000080fffc0, x4: 0x00000000080e0080, x5: 0x0000000000000000, x6: 0x0000000000000000, x7: 0x00000000000006a0, x8: 0x0000000000000000, x9: 0x0000000000000010, x10: 0x0000000008100000, x11: 0x0000000000004000, x12: 0x0000000000003fff, x13: 0x00000000000007a5, x14: 0x0000000000000000, x15: 0xffffffffffffffff, x16: 0x0000000000000005, x17: 0x0000000000000000, x18: 0x0000000000000000, x19: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x20: 0x0000000000000000, x21: 0x00000008f69a0710 [UIKitCore!0x1da44a710], x22: 0x00000008f5fb7568 [UIKitCore!0x1d9a61568], x23: 0x0000000000000000, x24: 0x00000002c8430ef9 [libobjc.A.dylib!0x19481aef9], x25: 0x00000008ee388540 [UIKitCore!0x1d1e32540], x26: 0x0000000000000000, x27: 0x0000000000000e19, x28: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x29: 0x0000000000077ec0, x30: 0x00000002c840f140 [libobjc.A.dylib!0x1947f9140] 2024-08-22 16:43:52,615 - main - ERROR: Initialize Objective-C failed. 2024-08-22 16:43:52,615 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140 Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate self.uc.emu_start(address, stop_addr) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/unicorn/unicorn.py", line 547, in emu_start raise UcError(status) unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/os/ios/os.py", line 166, in init_objc self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 758, in call_symbol return self._start_emulate(address, *args) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 215, in _start_emulate self.crash("Unknown reason", from_exc=e) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 381, in crash raise EmulatorCrashedException(message) from from_exc chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140 2024-08-22 16:43:52,629 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,629 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,629 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,630 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,635 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,635 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,635 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,636 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,638 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,638 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,639 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,640 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,640 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,642 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,642 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,643 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,643 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,644 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,644 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,646 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,646 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,647 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,648 - main - INFO: Load module "CSMBP-AppStore-Package" 2024-08-22 16:43:55,155 - main - INFO: Hook import symbol "_calloc" at 0x104f45430 2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_calloc" at 0x104f45430 2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_dispatch_async" at 0x104f45540 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_malloc_size" at 0x104f45e08 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_notify_register_dispatch" at 0x104f45ec8 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_posix_memalign" at 0x104f46150 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_rdlock" at 0x104f462f8 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_unlock" at 0x104f46300 2024-08-22 16:43:55,171 - main - INFO: Call symbol "_map_images" 2024-08-22 16:43:55,172 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-08-22 16:43:56,494 - main - INFO: Call symbol "_load_images" 2024-08-22 16:43:56,495 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac 2024-08-22 16:43:56,637 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:56,638 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:56,642 - main - INFO: Call symbol "_CFArrayCreateMutable" 2024-08-22 16:43:56,643 - main - INFO: Start emulate at CoreFoundation!0x1803d9ff4 2024-08-22 16:43:56,644 - main - INFO: Call symbol "_CFStringCreateWithCString" 2024-08-22 16:43:56,645 - main - INFO: Start emulate at CoreFoundation!0x18040e36c 2024-08-22 16:43:56,645 - main - INFO: Call symbol "_CFArrayAppendValue" 2024-08-22 16:43:56,646 - main - INFO: Start emulate at CoreFoundation!0x1803856c4 2024-08-22 16:43:56,647 - main - INFO: Call symbol "_CFStringCreateWithCString" 2024-08-22 16:43:56,648 - main - INFO: Start emulate at CoreFoundation!0x18040e36c 2024-08-22 16:43:56,648 - main - INFO: Call symbol "_CFArrayAppendValue" 2024-08-22 16:43:56,649 - main - INFO: Start emulate at CoreFoundation!0x1803856c4

Process finished with exit code 138 (interrupted by signal 10: SIGBUS)

这个问题比较奇怪,看着像是 unicorn 内部直接崩溃了,是只有这个示例是这样还是全部都是这样?可以提供下你的系统版本和 处理器型号吗?

@sailor-fly
Copy link

2024-08-22 16:43:52,615 - main - INFO: Backtrace: libobjc.A.dylib!0x1947f9140, libobjc.A.dylib!0x1947f913c, libobjc.A.dylib!0x194809c3c, libobjc.A.dylib!0x1947f9e28 2024-08-22 16:43:52,615 - main - INFO: State: x0: 0x00000001da44b5c0 [libc++abi.dylib!0x1b92255c0], x1: 0x0000000000000000, x2: 0x0000000000000000, x3: 0x00000000080fffc0, x4: 0x00000000080e0080, x5: 0x0000000000000000, x6: 0x0000000000000000, x7: 0x00000000000006a0, x8: 0x0000000000000000, x9: 0x0000000000000010, x10: 0x0000000008100000, x11: 0x0000000000004000, x12: 0x0000000000003fff, x13: 0x00000000000007a5, x14: 0x0000000000000000, x15: 0xffffffffffffffff, x16: 0x0000000000000005, x17: 0x0000000000000000, x18: 0x0000000000000000, x19: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x20: 0x0000000000000000, x21: 0x00000008f69a0710 [UIKitCore!0x1da44a710], x22: 0x00000008f5fb7568 [UIKitCore!0x1d9a61568], x23: 0x0000000000000000, x24: 0x00000002c8430ef9 [libobjc.A.dylib!0x19481aef9], x25: 0x00000008ee388540 [UIKitCore!0x1d1e32540], x26: 0x0000000000000000, x27: 0x0000000000000e19, x28: 0x00000008f5fb7548 [UIKitCore!0x1d9a61548], x29: 0x0000000000077ec0, x30: 0x00000002c840f140 [libobjc.A.dylib!0x1947f9140] 2024-08-22 16:43:52,615 - main - ERROR: Initialize Objective-C failed. 2024-08-22 16:43:52,615 - main - ERROR: Unknown reason at libobjc.A.dylib!0x1947f9140 Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 210, in _start_emulate self.uc.emu_start(address, stop_addr) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/unicorn/unicorn.py", line 547, in emu_start raise UcError(status) unicorn.unicorn.UcError: Invalid memory read (UC_ERR_READ_UNMAPPED)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/os/ios/os.py", line 166, in init_objc self.emu.call_symbol("_map_images", 1, 0, mach_header_ptrs) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 758, in call_symbol return self._start_emulate(address, *args) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 215, in _start_emulate self.crash("Unknown reason", from_exc=e) File "/Users/test/Data/opensource/chomper/venv/lib/python3.8/site-packages/chomper/core.py", line 381, in crash raise EmulatorCrashedException(message) from from_exc chomper.exceptions.EmulatorCrashedException: Unknown reason at libobjc.A.dylib!0x1947f9140 2024-08-22 16:43:52,629 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,629 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,629 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,630 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,630 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,635 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,635 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,635 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,636 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,636 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,638 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,638 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,639 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,639 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,640 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,640 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,640 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,641 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,641 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,642 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,642 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,642 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,643 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,643 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,644 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,644 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,644 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_getClass" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x194805c54 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,645 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,645 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,646 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:52,646 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:52,646 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:52,647 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:52,648 - main - INFO: Load module "CSMBP-AppStore-Package" 2024-08-22 16:43:55,155 - main - INFO: Hook import symbol "_calloc" at 0x104f45430 2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_calloc" at 0x104f45430 2024-08-22 16:43:55,162 - main - INFO: Hook import symbol "_dispatch_async" at 0x104f45540 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_malloc_size" at 0x104f45e08 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_notify_register_dispatch" at 0x104f45ec8 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_posix_memalign" at 0x104f46150 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_rdlock" at 0x104f462f8 2024-08-22 16:43:55,163 - main - INFO: Hook import symbol "_pthread_rwlock_unlock" at 0x104f46300 2024-08-22 16:43:55,171 - main - INFO: Call symbol "_map_images" 2024-08-22 16:43:55,172 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9dcc 2024-08-22 16:43:56,494 - main - INFO: Call symbol "_load_images" 2024-08-22 16:43:56,495 - main - INFO: Start emulate at libobjc.A.dylib!0x1947f9eac 2024-08-22 16:43:56,637 - main - INFO: Call symbol "_sel_registerName" 2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1948074a4 2024-08-22 16:43:56,638 - main - INFO: Call symbol "_objc_msgSend" 2024-08-22 16:43:56,638 - main - INFO: Start emulate at libobjc.A.dylib!0x1947ec460 2024-08-22 16:43:56,642 - main - INFO: Call symbol "_CFArrayCreateMutable" 2024-08-22 16:43:56,643 - main - INFO: Start emulate at CoreFoundation!0x1803d9ff4 2024-08-22 16:43:56,644 - main - INFO: Call symbol "_CFStringCreateWithCString" 2024-08-22 16:43:56,645 - main - INFO: Start emulate at CoreFoundation!0x18040e36c 2024-08-22 16:43:56,645 - main - INFO: Call symbol "_CFArrayAppendValue" 2024-08-22 16:43:56,646 - main - INFO: Start emulate at CoreFoundation!0x1803856c4 2024-08-22 16:43:56,647 - main - INFO: Call symbol "_CFStringCreateWithCString" 2024-08-22 16:43:56,648 - main - INFO: Start emulate at CoreFoundation!0x18040e36c 2024-08-22 16:43:56,648 - main - INFO: Call symbol "_CFArrayAppendValue" 2024-08-22 16:43:56,649 - main - INFO: Start emulate at CoreFoundation!0x1803856c4
Process finished with exit code 138 (interrupted by signal 10: SIGBUS)

这个问题比较奇怪,看着像是 unicorn 内部直接崩溃了,是只有这个示例是这样还是全部都是这样?可以提供下你的系统版本和 处理器型号吗?

macOS Monterey 12.2.1. Apple M1 Pro

@sledgeh4w
Copy link
Owner

Apple Silicon 崩溃问题统一到 #92

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

No branches or pull requests

4 participants