title: EXC_BAD_ACCESS crash on arm64 when use NSInvocation
body: <p>I've begun prepare one old project to support arm64 architecture. But when I try to execute this code on 64 bit device I get EXC_BAD_ACCESS crash on [invocation retainArguments]; line</p>
  
  <pre><code>- (void)makeObjectsPerformSelector: (SEL)selector withArguments: (void*)arg1, ...
  {
  
      va_list argList;
  
      NSArray* currObjects = [NSArray arrayWithArray: self];
      for (id object in currObjects)
      {
          if ([object respondsToSelector: selector])
          {
              NSMethodSignature* signature = [[object class] instanceMethodSignatureForSelector: selector];
  
              NSInvocation* invocation = [NSInvocation invocationWithMethodSignature: signature];
              invocation.selector = selector;
              invocation.target = object;
  
              if (arg1 != nil)
              {
                  va_start(argList, arg1);
  
                  char* arg = arg1;
  
                  for (int i = 2; i &lt; signature.numberOfArguments; i++)
                  {
                      const char* type = [signature getArgumentTypeAtIndex: i];
                      NSUInteger size, align;
                      NSGetSizeAndAlignment(type, &amp;size, &amp;align);
                      NSUInteger mod = (NSUInteger) arg % align;
  
                      if (mod != 0)
                          arg += (align - mod);
  
                      [invocation setArgument: arg
                                      atIndex: i];
  
                      arg = (i == 2) ? (char*) argList : (arg + size);
                  }
  
                  va_end(argList);
              }
  
              [invocation retainArguments];
              [invocation invoke];
          }
      }
  }
  </code></pre>
  
  <p>It seems like its some problem with arguments.</p>