IBM Support

IZ43436: APPLICATIN CRASHES IN DESTRUCTOR WITH -O

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • During the testing of an application, an exception occurs within
    a function that is called from within a constructor body in a
    complex constructor, which also involves template code.
    

Local fix

  • n/a
    

Problem summary

  • Program with the following classes:
    1. Class A has class B as its member
    2. Class B has class C as its member
    3. The dtor of class C has code that accesses its members
    4. Class B throws an exception (requires cleaning up the C
    object)
    
    
    When class B throws an exception, it invokes an
    Invoke_Destructor call in the RTE, passing in the object pointer
    of class C (object to be destroyed).
    The object pointer consists of 2 parts, the "this" pointer (from
    the object that invokes the call) + offset (ex. distance of
    object C from object B). Without inlining, the object pointer
    will be "address of B" + "distance of C from B", yielding the
    correct address to the C object.
    
    With FE inlining On, and class B is inlined into class A, the
    object pointer will be "address of A" + "distance of C from B",
    yielding an incorrect address. A seg fault may occur when dtor
    of C tries to access its members (since the object pointer to C
    is invalid.
    

Problem conclusion

  • The offset needs to be updated when class B is inlined into
    class A.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ43436

  • Reported component name

    XLC C++ AIX

  • Reported component ID

    5724M1200

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-02-06

  • Closed date

    2009-07-03

  • Last modified date

    2009-07-17

Fix information

  • Fixed component name

    XLC C++ AIX

  • Fixed component ID

    5724M1200

Applicable component levels

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0"}]

Document Information

Modified date:
03 October 2021