C++ ABI issues list

Off the top of my head:

C++ Specific:

  • Where the ‘this’ parameter can be found.
  • How virtual functions are called
    • ie does it use a vtable or other
    • What is the layout of the structures used for implementing this.
  • How are multiple definitions handled
    • Multiple template instantiations
    • Inline functions that were not inlined.
  • Static Storage Duration Objects
    • How to handle creation (in the global scope)
    • How to handle creation of function local (how do you add it to the destructor list)
    • How to handle destruction (destroy in reverse order of creation)
  • You mention exceptions. But also how exceptions are handled outside main()
    • ie before or after main()

Generic.

  • Parameter passing locations
  • Return value location
  • Member alignment
  • Padding
  • Register usage (which registers are preserved which are scratch)
  • size of primitive types (such as int)
  • format of primitive types (Floating point format)

Leave a Comment