Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
marlkiller opened this issue · comments
Void 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;
}
Void commented
Resolved~~~~