This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] update abi docs


Benjamin,

>From your new text in abi.txt in the libstdc++ docs:

! Use the 'make check-abi' rule in the libstdc++-v3 Makefile.
!
! This is a proactive check the library ABI. Currently, exported symbol
! names are checked against a last known good baseline. Currently, this
! baseline is keyed off of 3.2.0 binaries, as this was the last time the
! .so number was incremented. In addition, all exported names are
! demangled, and the exported objects are checked to make sure they are
! the same size as the same object in the baseline.
!
! In the future, more tests should be added. In particular, vtable
! information, offsets of data members in class objects, and other
! layout information should be checked.

This could get quite big.  Have you thought about how to manage that,
particularly when there are baseline files for many targets?

! It should be possible to use sizeof, alignof, and offset to compute
! offsets for each structure and type in the standard library, saving to
! another datafile. Then, compute this for new binaries, and look for
! differences.

This would catch changes to the compiler that change the layout of
existing class definitions, plus inadvertent changes to the class
definitions themselves within the library sources.  I suppose that it
won't be difficult to determine the cause when a difference is detected.

! Another approach might be to use the -fdump-class-hierarchy flag to
! get information.
! (See g++/7470 on how this was used to find bugs.)

Nice.  This, too, could result in many large baseline files.  I'm
interested in how to solve that problem because I would like to see the
consistency.vlad tests become usable.

How does this sound?  We could have a separate CVS tree for individual
baseline files, with a similar set of files for both the libstdc++
abi files and for the compiler testsuite's consistency.vlad files.  We
would also have, available for download, compressed sets of all baseline
files for a particular target, where "target" here actually means a set
of targets that share the same baseline files.  Only the people who are
generating the baseline sets need to deal with the CVS tree containing
the individual files; everyone else just downloads the sets for the
targets they are testing and unpacks them on top of their local tree.

Janis Johnson
IBM Linux Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]