IBM Support

PI24418: EXCEPTION NOT CAUGHT WITH INLINING ENABLED

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When optimization with inlining is used, an exception thrown
    within a function (with no try/catch), is not caught by it's
    caller function's try/catch block.  The exception is, instead,
    cascaded back one more caller level, to the caller's caller
    try/catch block.
    
    
    
       === EXAMPLE ===
    
    void throw_here()
    {
     throw MyException();
    }
    
    void should_catch_here()
    {
     try
     {
      switch (some_val)
       {
       case 1:  return 0;
       case 2:  throw_here(); break;
      }
     }
     catch (MyException& m)
     {
      // Exception should be caught here
     }
    }
    
    int main()
    {
     try {   should_catch_here();   }
     catch(...)
     {
      // Exception is caught here instead when INLINE is used
     }
    }
    
    Note:  Test example is not compilable
    

Local fix

  • Do not use inlining.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of xlC++ compiler with             *
    *                 versions V2R1, V2R1M1.                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: When inlining a function, switch        *
    *                      statement cases' exception state        *
    *                      corrupts downstream switch case state   *
    *                      for the purpose of state merge of       *
    *                      inlined function.                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Apply provided service.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI24418

  • 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

    2014-08-22

  • Closed date

    2014-09-16

  • Last modified date

    2016-05-05

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

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

    IV68022 LI78466

Modules/Macros

  •    CCNEPP
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R790 PSY UI21384

       UP14/10/23 P F410

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"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
30 April 2020