discuss-gnustep
[Top][All Lists]
Advanced

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

Re: gworkspace / clang / libobjc2 hang problem


From: David Chisnall
Subject: Re: gworkspace / clang / libobjc2 hang problem
Date: Fri, 26 Dec 2014 13:29:16 +0100

On 26 Dec 2014, at 12:47, Richard Frith-Macdonald 
<richardfrithmacdonald@gmail.com> wrote:

>  I wonder if this is an issue with invocations that we could fix some way?
> Anyway, I tried changing that method from -(NSRect)winRect to 
> -(void)getWinRect:(NSRect*)rptr./t 

I think that one of the NSInvocation sublcass implementations we had had a 
method called -_copyReturnValue or similar that would allocate some space in 
the invocation object for the return value and rewrite the pointer argument.  
This is relatively easy to do when you know the size of the return (which the 
FFI layer needs to anyway) and the calling convention, but as I recall libFFI 
doesn't support this.

It's also somewhat difficult to make NSInvocation semantics behave correctly if 
this is done, because the original caller expects the value to be in that 
location on the stack, so you'll want to fill in something there first.

OS X doesn't make any attempt to do this, as I discovered from the stack 
corruption that I got when I tried to make EtoileThread work there.

David




-- Sent from my IBM 1620




reply via email to

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