IBM Support

IJ24153: ERRANT DESTRUCTOR CALL AFTER OVERLOADED NEW FAILS TO ALLOCATE

Subscribe

You can track all active APARs for this component.

 

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

    IJ24153

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    G10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-04-08

  • Closed date

    2020-04-30

  • Last modified date

    2020-04-30

  • 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

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

Modified date:
22 August 2024