This is the mail archive of the gcc-prs@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]

libstdc++/7442: cxxabi.h does not match the C++ ABI


>Number:         7442
>Category:       libstdc++
>Synopsis:       cxxabi.h does not match the C++ ABI
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 30 01:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Grigory Zagorodnev
>Release:        3.1.1
>Organization:
>Environment:
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --enable-threads
>Description:
There is a couple of discrepancies between G++ implementation of 'cxxabi.h' file and the C++ ABI.

I. Member name difference
-------------------------

The C++ ABI defines that...
2.9.5 RTTI Layout 
9 The abi::__pointer_to_member_type_info type adds one field to abi::__pbase_type_info: 

      class __pointer_to_member_type_info : public __pbase_type_info {
	public:
	  const abi::__class_type_info *__context;
      };


G++ implementation is the following:
--- cxxabi.h ------------------------------------------------------------
class __pointer_to_member_type_info
  : public __pbase_type_info
{
/* abi defined member variables */
public:
  __class_type_info *__context_class;   /* class of the member */
-------------------------------------------------------------------------



II. Class name difference
-------------------------
Class '__base_class_type_info' specifyed by the C++ ABI, declared with the name '__base_class_info' in the G++'s cxxabi.h file. Moreover, name of the member __base_type is different too.

2.9.5 RTTI Layout 
6. Three different types are used to represent user type information: 
__base_info[] is an array of base class descriptions -- one for every direct proper base. Each description is of the type: 

      struct abi::__base_class_type_info {
	public:
         const __class_type_info *__base_type;
	 long __offset_flags;

	 enum __offset_flags_masks {
	   __virtual_mask = 0x1,
	   __public_mask = 0x2,
	   __offset_shift = 8
	 };

      };

--- G++'s cxxabi.h ------------------------------------------------------
class __base_class_info
{
/* abi defined member variables */
public:
  const __class_type_info *__base;    /* base class type */
  long __offset_flags;            /* offset and info */
-------------------------------------------------------------------------
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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