Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8012715

G1: GraphKit accesses PtrQueue::_index as int but is size_t

XMLWordPrintable

    • gc
    • b31
    • generic
    • generic

        http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2013-April/010299.html

        Hi all,
         
        we found a bug in the G1 barriers generated by the C2 compiler.
         
        In graphKit INT operations were generated to access PtrQueue::_index which
        has type size_t. This is 64 bit on 64-bit machines. No problems occur on
        little endian machines as long as the index fits into 32 bit, but on
        big endian machines the upper part is read, which is zero. This leads
        to unnecessary branches to the slow path into the runtime.
         
        The fix introduces X operations where INT was used:
        http://cr.openjdk.java.net/~goetz/webrevs/g1-size_t_bug/
         
        This also removes a cast node.
         
        We have also added a type T_X in globalDefinitions.hpp. Is there
        already a mechanism to express this?
         
        Please supply a bug id and review this change.
         
        Best regards,
        Martin

              johnc John Cuthbertson
              twisti Christian Thalinger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: