IBM Support

PI67358: DESTRUCTORS OF AUTOMATIC OBJECTS NOT CALLED DURING EXCEPTION STACK UNWINDING WHEN USING INLINING

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Local automatic objects in a function where an exception is
    thrown, or where an exception is thrown in a local function
    call, do not have their destructors called during the exception
    handling stack unwinding process.
    
    The issue is triggered by compiling with inlining enabled.
    Compiling with no inlining produces code that calls the local
    automatic object destructors.
    
    
    
       === CODE EXAMPLE ===
    
    Note:  not compilable/demonstrative of the issue.
    
    
    void throwFunction() { throw 12; }
    
    void smallFunction()
    {
        try
        {
            throwFunction();
        }
        catch(...)
        {
            printf("caught\n");
            throw;
        }
    }
    
    
    int func()
    {
        MyClass auto_object;     // DESTRUCTOR NOT CALLED
    
        ...
    
        if(someCondition(true))
        {
            smallFunction();
        }
        return  2;
    }
    

Local fix

  • Do not compile with inlining enabled.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: The problem may effect users of              *
    *                 exceptionhandling and inlining. Dtorcalls    *
    *                 for automatic variables may be missed        *
    *                 during stack unwinding after an exception    *
    *                 is thrown.                                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: Due to an issue with inlining           *
    *                      and exception handling, the dtor call   *
    *                      for some automatic objects may be       *
    *                      missedduring stack unwinding after      *
    *                      an exception is thrown.                 *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    *                                                              *
    ****************************************************************
    .
    

Problem conclusion

  • Apply provided fix.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI67358

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    791

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-10

  • Closed date

    2016-09-06

  • Last modified date

    2016-10-03

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

    PI61599

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

Modules/Macros

  •    CCNEPP
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R791 PSY UI40666

       UP16/09/22 P F609

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSQKCWV","label":"IBM C\/C++ for MVS\/ESA"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"791","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
09 August 2024