[Top][All Lists]

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

Re: problem with gnustep on OpenBSD sparc64

From: David Chisnall
Subject: Re: problem with gnustep on OpenBSD sparc64
Date: Wed, 6 Jul 2011 11:14:44 +0100

On 6 Jul 2011, at 11:02, David Chisnall wrote:

> On 6 Jul 2011, at 10:55, Sebastian Reitenbach wrote:
>> Error: Instance variables in NSTextTable overlap superclass NSTextBlock.  
>> Offset of first instance variable, _layoutAlgorithm, is 196.  Last instance 
>> variable in superclass, _widthType, ends at offset 148.  This probably means 
>> that you are subclassing aclass from a library, which has changed in a 
>> binary-incompatibleway.
> I think this is a bug in how libobjc2 is calculating sizes.  The last ivar of 
> NSTextBlock is an array of arrays, and my guess is that the runtime thinks 
> that it is smaller than it is.

Having said that, I can't actually reproduce this, and objc_sizeof_type() seems 
to return the same size as sizeof() for me when I copy the last ivar into a 
file and test it.  

Both of these numbers look a bit wrong.  For me, class_getInstanceSize() 
returns 172 for NSTextBlock, so unless you've got some very strict alignment 
requirements 196 looks too large.  The header doesn't seem to have been 
modified for a long time, so I'm not sure how it could happen.

Can you tell me from the debugger:

- What the type encoding of the last ivar is
- What the calculated size of the last ivar is
- How big void* is on your platform


-- Sent from my brain

reply via email to

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