The newly introduced CRC32C intrinsics unfortunately calculate a bad checksum, if
* the passed-in byte array has an offset != 0
* the intrinsic implementation is called via the interpreter or via a c1-compiled method.
Reason:
in contrast to the CRC32 intrinsics, the CRC32C intrinsics receive an end-index parameter instead of a length parameter. The length has to be calculated by the intrinsic as (endIndex - offset). This subtraction was simply forgotten.
* the passed-in byte array has an offset != 0
* the intrinsic implementation is called via the interpreter or via a c1-compiled method.
Reason:
in contrast to the CRC32 intrinsics, the CRC32C intrinsics receive an end-index parameter instead of a length parameter. The length has to be calculated by the intrinsic as (endIndex - offset). This subtraction was simply forgotten.
- relates to
-
JDK-8178720 CRC32C fails on x86 hardware without CLMUL support
-
- Open
-
-
JDK-8175368 [s390] Provide intrinsic implementation for CRC32C
-
- Resolved
-
-
JDK-8175369 [ppc] Provide intrinsic implementation for CRC32C
-
- Resolved
-