gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD: Services problems


From: Fred Kiefer
Subject: Re: OpenBSD: Services problems
Date: Thu, 08 Sep 2011 09:25:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.20) Gecko/20110804 SUSE/3.1.12 Thunderbird/3.1.12

On 07.09.2011 12:15, David Chisnall wrote:
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.

I fully agree that this change looks like the correct solution.

Riccardo, can you confirm that this fixes the problem for you?

Anybody willing to add a test that checks this behaviour?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]