IBM Support

IJ25964: INCORRECT OFFSET USED FOR 8-BYTE STDX STORE INSTRUCTION

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • When using the -O2 optimization level, an 8-byte store operation
    is using an incorrect offset value as the target memory address.
    This results in memory stored in an incorrect location on the
    stack.
    
    The cause of the bad offset calculation is due to an
    optimization that implements stores of 8-bytes with the stdx
    instruction, where the base offset is the stack pointer, and the
    offset value is NOT a multiple of 4.  In these cases, the offset
    into the stackframe from the stack pointer is not included in
    the overall offset calculation.
    

Local fix

  • - Use lower optimization level, or
    - If 8-byte store is due to memset(), avoid usage of the XLC
    compiler built-in __memcpy found in the string.h header file
    

Problem summary

  • USERS AFFECTED:
    Users who compile with -O2 and have memcpy statements may be
    affected by this issue.
    
    PROBLEM DESCRIPTION:
    The compiler was incorrectly optimizing the memcpy instruction
    leading to incorrect results at runtime
    

Problem conclusion

  • The compiler otpimizer has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ25964

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-07

  • Closed date

    2021-12-21

  • Last modified date

    2021-12-21

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

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

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1"}]

Document Information

Modified date:
22 December 2021