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

master分支在macOS Monterey 12.0.1 Intel环境下hook C++方法失败了,同时dev分支在macOS 12.0.1编译失败 #169

Open
yangshengchaoios opened this issue Oct 28, 2021 · 3 comments

Comments

@yangshengchaoios
Copy link

目前测试出了两个问题:

  1. master分支在macOS Monterey 12.0.1 Intel 环境下hook C++方法失败了
  2. dev分支在macOS 12.0.1编译失败(不确定dev分支是否已经修复hook C++ 方法,没编译出来,无法测试)
@wdp375
Copy link

wdp375 commented Nov 8, 2021

我也碰到,出现 EXC_GUARD (code=11529215050363437056, subcode=0x109ff6000),

@yangshengchaoios
Copy link
Author

基于 Dev 分支commitid: 31e4ab0
在调用mmap时,去掉 MAP_FIXED 的flag,在intel macOS12 环境下正常hook!

@SuperChaoM
Copy link

SuperChaoM commented Apr 18, 2022

  • 在intel macOS12.1 环境下hook失败!

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff81db3959e __mmap + 10
1 libsystem_kernel.dylib 0x7ff81db39537 mmap + 46
2 libhelper.dylib 0x11507227c OSMemory::Allocate(unsigned long, MemoryPermission, void*) + 140
3 libhelper.dylib 0x115075bd7 NearMemoryAllocator::allocateNearBlockFromUnusedRegion(unsigned int, unsigned long, unsigned long, bool) + 439
4 libhelper.dylib 0x1150762c3 NearMemoryAllocator::allocateNearDataMemory(unsigned int, unsigned long, unsigned long) + 259
5 libhelper.dylib 0x11507769b GenerateNormalTrampolineBuffer(unsigned long, unsigned long) + 139
6 libhelper.dylib 0x115073ef7 InterceptRouting::GenerateTrampolineBuffer(unsigned long, unsigned long) + 87
7 libhelper.dylib 0x11507418f FunctionInlineHookRouting::DispatchRouting() + 15
8 libhelper.dylib 0x115074125 DobbyHook + 357
9 dyld 0x120554b49 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
10 dyld 0x12057b29b invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 242
11 dyld 0x120572893 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 566
12 dyld 0x120541d91 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
13 dyld 0x12057261b dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
14 dyld 0x12057adf2 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 466
15 dyld 0x120554a7c dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
16 dyld 0x120554c08 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
17 dyld 0x120554beb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
18 dyld 0x120554cac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
19 dyld 0x12056832e dyld4::APIs::runAllInitializersForMain() + 222
20 dyld 0x120546358 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3438
21 dyld 0x1205454b4 start + 388

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

3 participants