IBM Support

PI14367: BINARY RETURNING INCORRECT BUFFER ADDRESS

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Compile the below  test case with xlC compiler, output from
    program showing the buffer address is incorrect.
    
    $cat test.cpp
    
    #include <iostream>
    class A {
    
    public:
     class B {
      static const unsigned char t[256];
     public:
      void doit();
     };
    
     class C {
      static const unsigned char t[256];
     public:
      void doit();
     };
    
    
    };
    
    const unsigned char A::B::t[256] = {};
    const unsigned char A::C::t[256] = {};
    
    template<const unsigned char* t>
    struct Doit {
    inline Doit() {
     std::cout << "Doit : t=" << ((void*)t) << std::endl;
    }
    };
    
    void A::B::doit() {
     std::cout << "A::B::doit t=" << ((void*)t) << std::endl;
     Doit<t>();
    }
    
    void A::C::doit() {
     std::cout << "A::C::doit t=" << ((void*)t) << std::endl;
     Doit<t>();
    }
    
    int main() {
     A::B b;
     A::C c;
    
     b.doit();
     c.doit();
    }
    
    $xlC -o test test.cpp
    
    ACTUAL OUTPUT:
    ./test
    A::B::doit t=19473D99
    Doit : t=19473D99
    A::C::doit t=19473E99
    Doit : t=19473D99
    
    EXPECTED OUTPUT:
    ./test
    A::B::doit t=19473D99
    Doit : t=19473D99
    A::C::doit t=19473E99
    Doit : t=19473E99
    
    The third and forth lines should be the same.
    

Local fix

  • na
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of template functions with             *
    *                 specialized template function arguments      *
    *                 having no qualifier information.             *
    ****************************************************************
    * PROBLEM DESCRIPTION: The parser in xlC compiler had issue    *
    *                      in name lookup since the variables      *
    *                      did not fully generate the qualifier    *
    *                      information, which resulted in a        *
    *                      variable with same name but different   *
    *                      parent class to be used as the same     *
    *                      variable during runtime.                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Apply provided service.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI14367

  • 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-03-24

  • Closed date

    2014-03-24

  • Last modified date

    2016-05-05

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

    PI06469

  • 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

  • R790 PSY UI16362

       UP14/04/26 P F404

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:
10 August 2024