On 7 Sep 2011, at 10:53, Richard Frith-Macdonald wrote:
This will probably make things work, but the problem is, this means we always
trust the method signature in the invocation (which might not actually contain
the same type info that the remote system would give us).
This is usually the right thing to do. We need the type information for two
things:
1) Deconstructing the stack frame that the sender created
2) Constructing the stack frame that the receiver wanted
Modulo compiler bugs, the types of the sending selector will always correspond
to the structure of the associated stack frame. If there is a type mismatch
between the sender and receiver, then we have a problem and there's no general
way that we can recover from it, although we can in some simple cases (e.g.
sign-extending I/i to Q/q).
If the sender does not have correct type information, then it will generate a
call frame that is almost certainly nonsense. In this case, Apple will happily
corrupt your stack for you, but it would be more helpful to print a back trace
and abort.