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

Assert left >= right in pointer_delta() methods

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • None
    • gc
    • b23

    Description

      During the investigation for JDK-8259271 we found that the compiler (rightfully) reordered some loads that were written concurrently that caused crashes.

      An assert in the pointer_delta() methods would have caught that unintentional reordering. pointer_delta() implicitly assumes left >= right, since the point of it is to use unsigned arithmetic to be able to deal with large memory ranges that exceed the range of ptrdiff_t.


      Investigate adding an assert in pointer_delta (and see what else crashes).

      Attachments

        Issue Links

          Activity

            People

              ayang Albert Yang
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: