[cxx-abi-dev] Question about tail padding

Mark Mitchell mark at codesourcery.com
Thu Aug 22 15:41:00 UTC 2002


> from the ABI doc, 2.1
> 	nvsize(O): the non-virtual size of an object, which intuitively is
> dsize(O) 	minus the size of virtual bases. It is always equal to dsize(O)
> for types 	without virtual bases.
> this implies that nvsize (B) should be 9. and A allocated there.
> but, 2.4 II says
> 	After all such components have been allocated, set nvalign(C) =
> align(C), and 	set nvsize(C) to the least multiple of nvalign(C) that is
> greater than or 	equal to dsize(C). The values of nvalign(C) and
> nvsize(C) will not change 	during virtual base allocation.
> which would make nvsize 12.
>
> This is a different problem to the one Mark brought up.

It is?

I thought we had decided last week to eliminate the 2.4 II reference to
updating nvsize(C), which would seem to eliminate this particular
inconsistency.  (That would also imply that G++ is incorrect.  From
looking at the G++ source code I can see why it behaves the way it does.)

As you say, what do Intel and HP do?  It would be very nice if they
happen to get this wrong in the same way that G++ does...

I've got patches to the ABI document to try to clarify the issue I
raised last week, but I will wait until we resolve this one too before
checking them in; we may as well try to clarify this all at once.

-- 
Mark Mitchell                mark at codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the cxx-abi-dev mailing list