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

fix crash on simulator iphone5s/6s/7 #127

wants to merge 3 commits into
base: master


None yet
1 participant
Copy link

ZenonHuang commented Aug 15, 2017

When I have some code

- (CGPoint)funcToSwizzleReturnPoint:(CGPoint)point
    return CGPointZero;

I use Aspects:

    SEL selector =  NSSelectorFromString(@"funcToSwizzleReturnPoint:");
    [Obj aspect_hookSelector:selector withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> info){
        NSLog(@"aspect obj");
    } error:nil];

Run on simulator iphone5s/6s/7, it crash.

So. I try to add code

#if defined(__LP64__) && __LP64__
            if (valueSize == 16) {
                methodReturnsStructValue = NO;

It work.

ZenonHuang added some commits Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment