Post

Replies

Boosts

Views

Activity

Comment on How to deduce from NSMethodSignature that a struct argument is passed by pointer?
@eskimo Thanks! I found the section you are referring here https://github.com/ARM-software/abi-aa/blob/320a56971fdcba282b7001cf4b84abb4fd993131/aapcs64/aapcs64.rst#642parameter-passing-rules. I think that I understand now why CMTime is encoded as a pointer. Not because it is passed on the stack but because it falls under the C.8 rule. I still curious if I can get this info from the runtime without the need to implement these rules myself.
Jan ’22
Comment on How to deduce from NSMethodSignature that a struct argument is passed by pointer?
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).
Jan ’22
Comment on How to deduce from NSMethodSignature that a struct argument is passed by pointer?
Their documentation: Don't do a regular -retainArguments on the invocation that we use for matching. NSInvocation effectively does an strcpy on char* arguments which messes up matching them literally and blows up with anyPointer (in strlen since it's not actually a C string). Also on the off-chance that anInvocation contains self as an argument, -retainArguments would create a retain cycle. Note that anyPointer is an OCMock specific term.
Jan ’22
Comment on Can't manage my sandbox account
For anyone reading this, there is a real workaround buried under the pile of replies. Don't give up and continue reading. I really wish Apple would edit their message and put it there so it will be visible. TL;DR: The issue for many users is that they are using TestFlight/personal iCloud account and not "Sandbox account" as the Sandbox account.
Feb ’24