Thank you for the effort. I am using OCMock mocking library in tests and recently started running our test suit on arm64. On this arch the library cause stack corruption with some of our tests. How? When a stub is created, it stores the NSInvocation. Instead of retaining it's arguments with the [NSInvocation retianArguments] they decided to implement their own retaining method The retaining method does not handle a situation when a struct needs to be copied from the stack, probably because struct arguments becoming pointers was not a thing in x86_64. I want to fix this by storing the argument somewhere and then using the stored argument when matching the invocation against an actual call. For this I need to identify arguments which needs to be copied (or copy everything, which I will probably do if I don't find a solution).