bug-gnustep
[Top][All Lists]
Advanced

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

Re: Anyone else having heavy problems with NSInvocation? - Addendum and


From: Richard Frith-Macdonald
Subject: Re: Anyone else having heavy problems with NSInvocation? - Addendum and fix
Date: Wed, 27 Nov 2002 17:28:49 +0000

On Wednesday, November 27, 2002, at 04:00  pm, Roland Schwingel wrote:

Hi...

Today morning I posted the fowarded mail to discuss-gnustep (after days of frustrating debugging),
but soon afterwards I could isolate the problem...

When building up the structures for avcall (and vacall respectively) GSFFCallInvocation must take the alignment ot the certain datatypes in account. This alignment is stored
in NSArgumentInfo. NSArgumentInfo is filled by mframe.m in function
mframe_next_arg(). To determin the alignment of structures it uses the gcc's __alignof__ . Here gcc (at least 2.95.3) returns 16 as alignment for structures. But the alignment for i386 is 4! => A 1000 funny crashes when using structures
over GSFFCallInvocation.

When replacing the __alignof__ with objc_alignof_type this problem can be fixed
(and now also structures are working very well for me).

Attached you find my changes to mframe.m. Maybe the change can find its way
into CVS (after verify)?

Thanks ... good fix.





reply via email to

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