gnustep-dev
[Top][All Lists]
Advanced

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

Re: ABI Compatibility (was Re: Installation woes for the average user...


From: Richard Frith-Macdonald
Subject: Re: ABI Compatibility (was Re: Installation woes for the average user...)
Date: Fri, 6 Mar 2009 07:56:58 +0000


On 6 Mar 2009, at 07:05, Xavier Glattard wrote:

Hi

I dont understand this problem about ABI and binary compatibility, so
please excuse me if this looks stupid :\

The problem comes from ivars that would not be always at the same
offset, doesn't it ? But these ivars are supposed to be private, dont
they ? So the code that uses these ivars is always released along with
the class interface. I can not find any official 'public' ivars. Do i
miss something ?

There are all sorts of possible issues with symbol names when functions and global variables etc are added/removed/changed, but the main issue we are talking about is the ivar layout and subclassing.

If you add an ivar to a class, the memory used by and instance becomes bigger to make room for it.

If you link in some bundle or library which uses a subclass of that class, the bundle/library will not be expecting that ivar to be there, and will have stored one of the subclass ivars at the oiffset in memory where the new ivar is stored ... causing obvious problems.

David's solution of non-fragile ivars requires compiler and runtime support, but is definitely the way to go to solve the problem (except for when the very highest performance is needed, in which case you can usually use straight C and other techniques for optimisation).





reply via email to

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