Hi,
I'm looking at lines 1032--1038 of NSInvocation.m:
struct {
char x[size];
} dummy;
dummy = va_arg(ap, typeof(dummy));
memcpy(datum, dummy.x, size);
This will only work in cases where the arguments are all passed on
the stack, so won't work for structures containing floating point,
vector, or integer arguments where there is still space in the
registers, and will cause stack corruption in the case where this is
not what happens. I am trying to work out why this code exists at
all, since ffi and ffcall contain routines for doing this safely.