jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

marlkiller opened this issue · comments

commented

I created a new MacOS -> Command Line project with xcode 15.2, and then introduced libdobby.dylib in the project;

I wrote a demo and reported an error. Both of our mac (x86_64/arm) books are this exception
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0),

Request support~~

#import <Foundation/Foundation.h>
#import "dobby.h"

int sum(int a, int b) {
    return a+b;
}
static int (*sum_p)(int a, int b);
int mySum(int a,int b){
    return a * b;
}

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
        NSLog(@"%d", sum(1, 2));
        DobbyHook(sum, mySum, (void *)&sum_p);
        NSLog(@"%d", sum(1, 2));
        
    }
    return 0;
}
1
commented

Resolved~~~~