IBM Support

LI75540: MEMORY FAULT DURING EXCEPTION HANDLING

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following runtime problem occurs with the C++ compiler
    during exception handling in the class containing std list:
    
    -----------------Testcase---------------------------------
    
    using namespace std;
    #include <list>
    #include <iostream>
    
    class myex
    {
    private:
       std::list<int> l;
    
    public:
       myex()
       {
    
       }
    };
    
    int main()
    {
       try
       {
        cout<<"Runnig with catch";
        throw myex();
       }
       catch(myex &e)
       {
         cout<<"Received exception";
       }
       return 0;
    }
    
    -----------------------------------------------------
    

Local fix

  • In declaration of try block change from:
    
       try
       {
        cout<<"Runnig with catch";
        throw myex();
       }
    
    to:
    
       try
       {
        cout<<"Runnig with catch";
        myex a = myex();
        throw a;
       }
    

Problem summary

  • Runtime seg fault while trying to destroy the std list.
    Incorrect dtor address for the std list was passed to the
    runtime after the FE optimizer elminated the temporaries, and
    the FE transformer did not perform the corresponding
    temporaries replacement.
    

Problem conclusion

  • FE optimizer needs to conserve the
    _constructionOfThrowTemporary flag during temporaries
    elmination.  FE transformer will perform the necessary
    temporaries replacement if the flag is set
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75540

  • Reported component name

    XL C/C++ RHEL52

  • Reported component ID

    5724U8310

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-07-28

  • Closed date

    2010-07-28

  • Last modified date

    2010-07-28

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

    LI74933

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

Fix information

  • Fixed component name

    XL C/C++ RHEL52

  • Fixed component ID

    5724U8310

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 October 2021