JDK-8156731 : aarch64: java/util/Arrays/Correct.java fails due to _generic_arraycopy stub routine
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2016-05-11
  • Updated: 2021-02-01
  • Resolved: 2016-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9 Other
9 b126Fixed openjdk8u292Fixed
Related Reports
Relates :  
Description
Error message:
----------System.out:(141/10863)----------
[TestNG] Running:
  java/util/Arrays/Correct.java

test Correct.testComparatorSort(java.util.Collections$ReverseComparator2@9146119): failure
java.lang.AssertionError: Arrays did not match. size=673: Lists differ at element [229]: -1847546497 != -1816127115 expected [-1847546497] but found [-1816127
115]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:494)
        at org.testng.Assert.assertEquals(Assert.java:123)
        at org.testng.Assert.assertEquals(Assert.java:549)
        at org.testng.Assert.assertEquals(Assert.java:572)
        at Correct.testComparatorSort(Correct.java:65)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
        at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14)
        at java.util.concurrent.FutureTask.run(java.base@9-internal/FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-internal/Executors.java:514)
        at java.util.concurrent.FutureTask.run(java.base@9-internal/FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-internal/ThreadPoolExecutor.java:1158)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-internal/ThreadPoolExecutor.java:632)
        at java.lang.Thread.run(java.base@9-internal/Thread.java:843)
test Correct.testComparatorSort(Correct$1@4c3ad8ac): success
test Correct.testComparatorSort(Correct$2@48aa013d): failure
java.lang.AssertionError: Arrays did not match. size=734: Lists differ at element [365]: -2077910346 != -1954531587 expected [-2077910346] but found [-1954531
587]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:494)
        at org.testng.Assert.assertEquals(Assert.java:123)
        at org.testng.Assert.assertEquals(Assert.java:549)
        at org.testng.Assert.assertEquals(Assert.java:572)
        at Correct.testComparatorSort(Correct.java:65)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
        at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14)
        at java.util.concurrent.FutureTask.run(java.base@9-internal/FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-internal/Executors.java:514)
        at java.util.concurrent.FutureTask.run(java.base@9-internal/FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-internal/ThreadPoolExecutor.java:1158)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-internal/ThreadPoolExecutor.java:632)
        at java.lang.Thread.run(java.base@9-internal/Thread.java:843)

    ......

After narrowing down, the issue is caused by _generic_arraycopy stub routine.  It does not handle oop size properly, will propose a patch to fix the defect.