IBM Support

IV61042: 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 anythingx = x?1; // Update variable x using
    integer xor operator with constant value 1if (x?1 == 0) {//
    Here, the optimizer can prove that x?1 must be zeroif (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 valueif
    (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

    IV61042

  • Reported component name

    JAVA 5 JIT

  • Reported component ID

    620500124

  • Reported release

    500

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-05-29

  • Closed date

    2014-05-30

  • Last modified date

    2014-06-04

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

    IV60353

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

Fix information

  • Fixed component name

    JAVA 5 JIT

  • Fixed component ID

    620500124

Applicable component levels

  • R500 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":"5.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
04 June 2014