IBM Support

IV60353: INCORRECT OPTIMIZATION OF VARIABLE UPDATES USING INTEGER XOR OPERATOR ("^")

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: Program operates incorrectly when it contains a
    statement of the form: "x = x ^ 1";
    .
    Stack Trace: N/A
    .
    

Local fix

  • -Xjit:disableLocalVP,disableGlobalVP will prevent the error. If
    applied globally this may have a significant cost in performance
    which will vary from application to application, but can be in
    the region of 20%. If this can be targeted at only the methods
    exhibiting the problem the performance impact will be far less,
    and possibly not measurable. For example to apply the work
    around to all the methods of a.b.ClassA
    use:-Xjit:{a/b/ClassA.*}(disableLocalVP,disableGlobalVP)
    

Problem summary

  • In certain cases, the JIT optimizer can incorrectly transform an
    integer xor expression by wrongly considering the consequences
    of downstream if statements, when those if statements
    redundantly test the same condition.
    For example, if the user program contained code like the
    following:
    
      void foo(int x) {      //Here, x could be anything
        x = x^1; // Update variable x using integer xor operator
    with constant value 1
        if (x^1 == 0) {
          // Here, the optimizer can prove that x^1 must be zero
          if (x^1 == 0) {    // Redundant check
            ...
          }
        }
      }
    
    The JIT optimizer could perform an incorrect optimization that
    would cause the code to behave as  follows:
      void foo(int x) {
        x = 0; // Incorrectly optimized value
        if (0 == 0) {
          ...
        }
      }
    

Problem conclusion

  • This APAR will be fixed in the following Java Releases:
       5.0  SR16 FP7  (5.0.16.7)
       6    SR16 FP1  (6.0.16.1)
       626  SR8  FP1  (6.1.8.1)
       7    SR7  FP1  (7.0.7.1)
       7.1  SR1  FP1  (7.1.1.1)
    
    The faulty logic was removed from the JIT optimizer.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV60353

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-05-12

  • Closed date

    2014-05-30

  • Last modified date

    2015-08-31

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

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

    IV61042

Fix information

  • Fixed component name

    JIT

  • Fixed component ID

    620700124

Applicable component levels

  • R600 PSY

       UP

  • R260 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSC9HBA","label":"Just In Time (JIT) Compiler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
31 August 2015