A fix is available
APAR status
Closed as program error.
Error description
The compiler runs out of virtual storage in the front end for the following test case with the following compile options: ===== COMPILE COMMAND: cxx -+ -c -Wc,"OPTIMIZE(2)" -o ivmail.o ivmail.cpp $cat ivmail.cpp ??=pragma filetag("IBM-1047") using namespace std; #include <string> #include <string> #include <vector> #include <vector> #include <memory.h> #include <memory.h> #include <stdarg.h> #include <stdarg.h> class CIvTMDateiList { }; class IMail { public: virtual std::string GetApplication() = 0; virtual std::string GetBetreff() = 0; virtual std::string GetText() = 0; virtual CIvTMDateiList* GetAttaches() { return NULL; }; }; class IMailOutlook : public IMail { public: virtual void GetEmpfaengerAn(std::vector<std::string>& rvstrAnEmpfaenger) = 0; virtual void GetEmpfaengerCC(std::vector<std::string>& rvstrCCEmpfaenger) {}; virtual std::string GetAbsender() = 0; }; class _Export CIvMail { public: std::string SendMail(const std::string& strApplication, const std::string& strBetreff,const std::string& strText, CIvTMDateiList& rtmAttachList,const std::vector<std::string>& vstrEmpfUserId_An, const std::vector<std::string>& vstrEmpfUs erId_CC); virtual std::string Send(IMail& rMailDaten) =0 ; }; std::string CIvMail::SendMail(const string& strApplication, const string& strBetreff, const string& strText, CIvTMDateiList& rtmAttachList, const vector<string>& vstrEmpfUserId_An, const vector<string>& vstrEmpfUserId_CC) { class MailData: public IMailOutlook { public: std::vector<std::string> m_vstrAnEmpfaenger; std::vector<std::string> m_vstrCCEmpfaenger; string m_strApplication; string m_strBetreff; string m_strText; CIvTMDateiList* m_sptmAttachList; virtual void GetEmpfaengerAn(std::vector<std::string>& rvstrAnEmpfaenger) {rvstrAnEmpfaenger = m_vstrAnEmpfaenger;}; virtual void GetEmpfaengerCC(std::vector<std::string>& rvstrCCEmpfaenger) {rvstrCCEmpfaenger = m_vstrCCEmpfaenger;}; virtual std::string GetAbsender() {return "TG00882";}; virtual std::string GetApplication() {return m_strApplication; }; virtual std::string GetBetreff() {return m_strBetreff;}; virtual std::string GetText() {return m_strText;}; virtual CIvTMDateiList* GetAttaches() {return m_sptmAttachList;}; }; MailData Mail; Mail.m_strApplication = strApplication; Mail.m_strBetreff = strBetreff; Mail.m_strText = strText; Mail.m_vstrAnEmpfaenger = vstrEmpfUserId_An; Mail.m_vstrCCEmpfaenger = vstrEmpfUserId_CC; Mail.m_sptmAttachList = NULL; Mail.m_sptmAttachList = new CIvTMDateiList; (*Mail.m_sptmAttachList) = rtmAttachList; return Send(Mail); } $ ===== ACTUAL OUTPUT: $cxx -+ -c -Wc,"OPTIMIZE(2),phaseid" -o ivmail.o ivmail.cpp FATAL ERROR CCN3300 Insufficient storage available. $ ===== EXPECTED OUTPUT: Should not run out of storage.
Local fix
Use the NOIINLINE option as a workaround.
Problem summary
**************************************************************** * USERS AFFECTED: Users with a particular combination of * * template instantiations could potentially * * hit this out of memory problem at OPT(2), * * I did not determine a specific pattern * * of template that causes it, * * just that it can potentially happen. * * * * Note that several other compiler options * * were in effect as well, meaning it is likely * * not prevalent bug. * **************************************************************** * PROBLEM DESCRIPTION: The compiler gets stuck in an infinite * * loop attempting to instantiate one of t * * the templates in the customer's source, * * leading the compiler to run out of * * memory. * **************************************************************** * RECOMMENDATION: * **************************************************************** WORKAROUND: Don't compile at OPT(2). EXPECTED ERROR: The compiler runs out of memory after a few minutes and emits a message explaining as much.
Problem conclusion
In the V1R10 and V1R11 source code, a loop was found, and a relatively simple check was implemented to stop the loop.
Temporary fix
Comments
APAR Information
APAR number
PM08072
Reported component name
C/C++ FOR MVS
Reported component ID
56551210A
Reported release
760
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2010-02-19
Closed date
2010-02-19
Last modified date
2010-04-03
APAR is sysrouted FROM one or more of the following:
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
R760 PSY UK54346
UP10/03/19 P F003
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":"760","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":"760","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
09 August 2024