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

java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly

    XMLWordPrintable

Details

    Backports

      Description

        JDK-8026344 added tests that subtly contradict the contract for `{Double,Long}Accumulator`-s, which breaks the tests on some platforms even in the single-threaded case.

        They use accumulators with binary plus as update function and using non-zero values as identity, which breaks once accumulators create many cells, reset their values to identity, and then apply the function over them, producing unexpected values.

        See the investigation on RISC-V here:
          https://mail.openjdk.org/pipermail/riscv-port-dev/2022-August/000594.html

        Attachments

          Issue Links

            Activity

              People

                shade Aleksey Shipilev
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: