IBM Support

PH06947: BAD STRNCPY WITH OPT(2) AND VECTOR(AUTOSIMD) OPTIMIZATION

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When compiling with OPT(2) and VECTOR(AUTOSIMD), a strncpy()
    function call is invalid.  The issue occurs when n=0, and n is
    not a literal value.  In some cases, the initial 16-bytes of the
    destination location are overwritten incorrectly.
    

Local fix

  • use ARCH(10), NOOPT, or VECTOR(NOAUTOSIMD)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of strncpy() with n=0, when n isn't a  *
    *                 literal value, with the following compiler   *
    *                 options: ARCH(11) and up, OPT(2) and up,     *
    *                 and VECTOR(AUTOSIMD)                         *
    ****************************************************************
    * PROBLEM DESCRIPTION: When n=0, where n isn't a literal       *
    *                      value,  the initial 16-bytes of         *
    *                      destination location on the strncpy()   *
    *                      might get clobbered, when ARCH(11) and  *
    *                      up, OPT(2) and up, and                  *
    *                      VECTOR(AUTOSIMD)                        *
    *                      options are used.                       *
    ****************************************************************
    * RECOMMENDATION: install the PTF                              *
    ****************************************************************
    .
    

Problem conclusion

  • corrected the issue with the compiler
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH06947

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7B0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-01-07

  • Closed date

    2019-06-03

  • Last modified date

    2019-07-01

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

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

    UI63377

Modules/Macros

  • CCNECICS CCNECWI  CCNED230 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNPDF23 CCNPDF24 CCNPDF25 CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7B0 PSY UI63377

       UP19/06/28 P F906

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

Document Information

Modified date:
15 August 2024