A fix is available
APAR status
Closed as program error.
Error description
C++ destructors are called twice for local objects when exiting a function via a nested return statement. === EXAMPLE === int myfunc() { MyObject obj; ... if(statement) { return 1; // obj destructor called twice here, or } else { return 2; // obj destructor called twice here } ... }
Local fix
Add a return statement to the outer scope.
Problem summary
**************************************************************** * USERS AFFECTED: The problem may be seen in functions * * that contain local variables and * * returnstatements in nested scope which have * * no return statement at the outer scope. * **************************************************************** * PROBLEM DESCRIPTION: A compile-time optimization was * * causingduplicate destructor calls for * * thenested local variables in some * * cases. * **************************************************************** * RECOMMENDATION: * **************************************************************** .
Problem conclusion
Apply provided service.
Temporary fix
Comments
APAR Information
APAR number
PI71797
Reported component name
C/C++ FOR MVS
Reported component ID
56551210A
Reported release
790
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-11-03
Closed date
2016-11-06
Last modified date
2016-12-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI42323
Modules/Macros
CCNECICS CCNECWI CCNEDSCT CCNEDWRT CCNED210 CCNEFILT CCNEHIFC CCNEMDEP CCNEOPTP CCNEP CCNEPP CCNETBY CCNMSGE CCNMSGT
Fix information
Fixed component name
C/C++ FOR MVS
Fixed component ID
56551210A
Applicable component levels
R790 PSY UI42323
UP16/11/22 P F611
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":"790","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":"790","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
09 August 2024