IBM Support

PK67273: __gtca() high bits cleared in function call

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When the results of __gtca() are passed to a function call in
    64-bit mode withouth optimization, the top bits of the address
    are cleared.
    
    e.g.:
    $ cat tc.c
    #include <stdio.h>
    #include <stdlib.h>
    void *
    print(const void *caa)
    {
      printf("%016p\n", caa);
      return NULL;
    }
    int main()
    {
       const void *caa;
       print(__gtca());
       printf("%016p\n", __gtca());
       caa = __gtca();
       printf("%016p\n", caa);
    }
    $ xlc -Wc,lp64 -Wl,lp64 tc.c
    $ a.out
    0000000000007B18
    0000000000007B18
    0000000100007B18
    $
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Compiling at 64bit mode and noopt            *
    *                 that uses _gtca builtin.                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: The builtin _gtca would clear upper     *
    *                      half of the address of the CAA.         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    WORKAROUND:
                        Problem not presented at opt compilation.
    EXPECTED ERROR:
                        The address of the CAA that is returned from
                        _gtca has the upper half cleared to 0
    

Problem conclusion

  • Removed the clearing of the address which was being
    enforced at noopt code generation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK67273

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    740

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2008-06-06

  • Closed date

    2008-07-17

  • Last modified date

    2008-10-03

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

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

    PK69488

Modules/Macros

  •    CCNETBY
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R740 PSY UK38212

       UP08/09/13 P F809

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":"740","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":"740","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
09 August 2024