IBM Support

PH66038: CALLING A FUNCTION IN AMODE64 VIA A POINTER WITH __PTR32 MODIFIER RESULTS IN A COMPILER CRASH

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Calling a function in amode64 via a pointer with __ptr32
    modifier results in a compiler crash
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: C and C++ users who call a function in       *
    *                 amode64 via a pointer with __ptr32 modifier. *
    *                 For example file call.c:                     *
    *                 typedef struct _Systable {                   *
    *                 void *__ptr32 Addr;                          *
    *                 } Systable;                                  *
    *                                                              *
    *                 typedef void (Func)();                       *
    *                 #pragma linkage(Func, OS64_NOSTACK)          *
    *                                                              *
    *                 void call(Systable *Sys) {                   *
    *                 ((Func *__ptr32) Sys->Addr)();               *
    *                 }                                            *
    *                                                              *
    *                 Compile command:                             *
    *                 ibm-clang -m64 call.c                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: The 32 bit wide address is loaded but   *
    *                      not extended to 64 bit. However, the    *
    *                      code generation expects a 64 bit        *
    *                      address.                                *
    ****************************************************************
    * RECOMMENDATION: Apply the PTF.                               *
    ****************************************************************
    Calling a function in amode64 via a pointer with __ptr32
    modifier results in a compiler crash.
    

Problem conclusion

  • Code generation must be change to handle this case.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH66038

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7C3

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2025-04-07

  • Closed date

    2025-05-05

  • Last modified date

    2025-05-10

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

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

    UO03042

Modules/Macros

  • CNW$P00  CNWC001  CNWC003  CNWC008  CNWC00B  CNWC00D  CNWC00E
    CNWC00F  CNWC010  CNWC012  CNWC013  CNWC015  CNWC018  CNWC01A
    CNWCH001 CNWCH005 CNWCH008 CNWCH016 CNWCH017 CNWCH01A CNWCH01B
    CNWCH01D CNWCH01E CNWCH022 CNWCH025 CNWCH028 CNWCH02C CNWCH02E
    CNWCH02F CNWJIVP1 CNWOX210 CNWPH001 CNWPH002 CNWPH004 CNWPH008
    CNWPH009 CNWPH00C CNWPH00D CNWPH00F CNWPH010 CNWPH011 CNWPH012
    CNWPH015 CNWPH017 CNWPH019 CNWPH01A CNWPH01D CNWPH01E CNWPH01F
    CNWPH023 CNWPH024 CNWPH026 CNWPH027 CNWPH02A CNWPH02C CNWPH02D
    CNWPH02E CNWPH02F CNWPH031 CNWPH033 CNWPH034 CNWPH035 CNWPH037
    CNWPH038 CNWPH03C CNWPH042 CNWPH044 CNWPH045 CNWPH046 CNWPH047
    CNWPH04A CNWPH04C CNWPH04E CNWPH050 CNWPH052 CNWPH054 CNWPH056
    CNWPH057 CNWPH05C CNWPH05E CNWPH060 CNWPH062 CNWPH064 CNWPH06B
    CNWPH06E CNWPH070 CNWPH071 CNWPH072 CNWPH073 CNWPH075 CNWPH076
    CNWPH077 CNWPH079 CNWPH07A CNWPH07D CNWPH07E CNWPH081 CNWPH083
    CNWPH084 CNWPH086 CNWPH089 CNWPH08D CNWPH08E CNWPH08F CNWPH091
    CNWPH092 CNWPH097 CNWPH099 CNWPH09B CNWPH09C CNWPH09D CNWPH0A0
    CNWPH0A2 CNWPH0A4 CNWPH0A5 CNWPH0A6 CNWPH0A8 CNWPH0AA CNWPH0AB
    CNWPH0AC CNWPH0AE CNWPH0AF CNWPH0B2 CNWPH0B8 CNWPH0BA CNWPH0BB
    CNWPH0BC CNWPH0BD CNWPH0BE CNWPH0C0 CNWPH0C3 CNWPH0C5 CNWPH0C6
    CNWPH0CB CNWPH0CE CNWPH0D0 CNWPH0D3 CNWPH0D4 CNWPH0D5 CNWPH0D7
    CNWPH0D9 CNWPH0DA CNWPH0DB CNWPH0E4 CNWPH0E6 CNWPH0EA CNWPH0EF
    CNWPH0F1 CNWPH0F2 CNWPH0F3 CNWPH0F4 CNWPH0F6 CNWPH0FA CNWPH102
    CNWPH103 CNWPH104 CNWPH105 CNWPH107 CNWPH108 CNWPH109 CNWPH10A
    CNWPH10B CNWPH10C CNWPH10D CNWPH10F CNWPH114 CNWPH116 CNWPH118
    CNWPH119 CNWPH11D CNWPH120 CNWPH127 CNWPH128 CNWPH12A CNWPH12B
    CNWPH12C CNWPH12E CNWPH12F CNWPH134 CNWPH136 CNWPH137 CNWPH139
    CNWPH13B CNWPH13C CNWPH13D CNWPH13F CNWPH141 CNWPH142 CNWPH143
    CNWPH145 CNWPH147 CNWPH148 CNWPH14B CNWPH14C CNWPH14D CNWPH14E
    CNWPH14F CNWPH151 CNWPH152 CNWPH155 CNWPH15B CNWPH15F CNWPH160
    CNWPH161 CNWPH163 CNWPH166 CNWPH167 CNWPH168 CNWPH169 CNWPH16B
    CNWPH16C CNWPH16D CNWPH171 CNWPH173 CNWPH176 CNWPH177 CNWPH17B
    CNWPH17C CNWPH17E CNWPH182 CNWPH183 CNWPH184 CNWPH185 CNWPH186
    CNWPH18A CNWPH18C CNWPH18D CNWPH18E CNWPH192 CNWPH193 CNWPH197
    CNWPH198 CNWPH19A CNWPH19C CNWPH19D CNWPH19E CNWPH19F CNWPH1A0
    CNWPH1A2 CNWPH1A4 CNWPH1A5 CNWPH1A6 CNWPH1A8 CNWPH1A9 CNWPH1AE
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C3 PSY UO03042

       UP25/05/10 I 1000

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":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7C3","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
10 May 2025