IBM Support

IJ21428: ERRANT DESTRUCTOR CALL AFTER OVERLOADED NEW FAILS TO ALLOCATE

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An invalid destructor call is performed on a non-existent
    object. The issue occurs when calling an object's overloaded
    new() operator:
    
    
       ObjectData* ObjectData::allocate(ObjectArg objarg)
       {
         return new ObjectData( objarg() );    // ***
       }
    
    
    If the new() returns NULL, no copy of the object should be
    constructed, however the generated code for this line is always
    automatically adding the bookend destructor for this conditional
    object creation, causing a bad destructor call if the object
    isn't actually initially constructed.
    

Local fix

Problem summary

  • PROBLEM DESCRIPTION:
    Cleanup actions (on the normal program execution, not exception
    handling path) associated with the new expression
    initialization may incorrectly run if the allocation fails.
    
    USERS AFFECTED:
    C++ new expressions where allocation returns 0 from a
    non-throwing allocator.
    

Problem conclusion

  • A fix was implemented to the exception handling instrumentation
    of the compiler when handling conditional expressions
    associated with new allocation checks.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ21428

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-12-08

  • Closed date

    2021-05-31

  • Last modified date

    2021-05-31

  • APAR is sysrouted FROM one or more of the following:

    IJ20459

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1"}]

Document Information

Modified date:
03 June 2021