IBM Support

PH27049: __PTR64 POINTER TREATED AS 31-BIT POINTER WHEN PASSED AS FUNCTION PARAMETER WITH O2

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A function expects a 64-bit pointer in ILP32 mode, yet when
    optimization is used, the code generated to call the function
    treats the pointer as 31-bit.  Example:
    
    
    static int my_test_func(
                 SOME_TYPE *__ptr64 val, SOME_OTHER_TYPE on)
    
    
    Starting with the Nov 2019 V2R4 PTF (UI65848), the code
    generated with -O2 looks like the following:
    
    
    *  my_test_func(val,on);
      ST    7,152(,13)         <=== STORES 31-bit POINTER
      MVHI  156(13),1
      LA    1,152(,13)
      MVC   8(4,13),#NAB_8+4
      BRASL 14,@391ccsm_rcvy_set_svcdump
    
    
    Previous V2R4 releases generated correct code and parameter
    list:
    
    
    *  my_tesT_func(val,on);
      ST    7,156(,13)      <=== STORE HALF OF THE 64-BIT POINTER
      MVHI  160(13),1
      SRAG  2,7,32
      STG   2,42528(0,13)
      LA    1,152(,13)
      ST    2,152(,13) <= STORE THE OTHER HALF OF THE 64-BIT POINTER
      MVC   8(4,13),#NAB_8+4
      BRASL 14,@391ccsm_rcvy_set_svcdump
    

Local fix

  • Do not use optimization.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of ILP32, METAL, and OPT compiler      *
    *                 option                                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: If a __ptr64 is passed to a non         *
    *                      attribute amode64 function, the high    *
    *                      half of the pointer may not be passed   *
    *                      correctly                               *
    ****************************************************************
    * RECOMMENDATION: Install PTF or use workaround                *
    ****************************************************************
    N/A
    

Problem conclusion

  • Install PTF or use workaround
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH27049

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7C0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-03

  • Closed date

    2021-02-05

  • Last modified date

    2021-04-01

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

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

    PH33321

Modules/Macros

  • CCNECICS CCNECWI  CCNED240 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C0 PSY UI73821

       UP21/03/26 P F103

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.

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7C0"}]

Document Information

Modified date:
02 April 2021