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

RISC-V: TestArrayStructs.java fails after JDK-8303604

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 21
    • 21
    • core-libs
    • None
    • 21
    • b14
    • riscv
    • linux

    Description

      STDOUT:
      NativeTestHelper::DEFAULT_RANDOM.seed = 1551929993
      Re-run with '-DNativeTestHelper.DEFAULT_RANDOM.seed=1551929993' to reproduce
      test TestArrayStructs.testArrayStruct("F1", jdk.internal.foreign.FunctionDescriptorImpl@4c815601, 0, 1): success
      test TestArrayStructs.testArrayStruct("F2", jdk.internal.foreign.FunctionDescriptorImpl@c5bfb79, 0, 2): success
      test TestArrayStructs.testArrayStruct("F3", jdk.internal.foreign.FunctionDescriptorImpl@790bfb0b, 0, 3): failure
      java.lang.IndexOutOfBoundsException: Out of bound access on segment MemorySegment{ array: Optional.empty address:271122530288 limit: 3 }; new offset = 0; new length = 4
              at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.outOfBoundException(AbstractMemorySegmentImpl.java:371)
              at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.apply(AbstractMemorySegmentImpl.java:357)
              at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.apply(AbstractMemorySegmentImpl.java:70)
              at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
              at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:124)
              at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:448)
              at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.checkBounds(AbstractMemorySegmentImpl.java:346)
              at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.checkAccess(AbstractMemorySegmentImpl.java:311)
              at java.base/java.lang.invoke.VarHandleSegmentAsInts.checkAddress(VarHandleSegmentAsInts.java:81)
              at java.base/java.lang.invoke.VarHandleSegmentAsInts.get(VarHandleSegmentAsInts.java:108)
              at java.base/java.lang.foreign.MemorySegment.get(MemorySegment.java:1552)
              at java.base/jdk.internal.foreign.abi.SharedUtils.read(SharedUtils.java:471)
              at java.base/jdk.internal.foreign.abi.Binding$BufferLoad.interpret(Binding.java:651)
              at java.base/jdk.internal.foreign.abi.BindingInterpreter.unbox(BindingInterpreter.java:38)
              at java.base/jdk.internal.foreign.abi.DowncallLinker.invokeInterpBindings(DowncallLinker.java:171)
              at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
              at TestArrayStructs.testArrayStruct(TestArrayStructs.java:94)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:578)
              at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
              at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
              at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
              at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
              at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
              at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
              at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
              at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
              at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
              at org.testng.TestRunner.privateRun(TestRunner.java:764)
              at org.testng.TestRunner.run(TestRunner.java:585)
              at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
              at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
              at org.testng.SuiteRunner.run(SuiteRunner.java:286)
              at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
              at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
              at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
              at org.testng.TestNG.runSuites(TestNG.java:1069)
              at org.testng.TestNG.run(TestNG.java:1037)
              at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
              at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:578)
              at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
              at java.base/java.lang.Thread.run(Thread.java:1623)

      Attachments

        Issue Links

          Activity

            People

              fjiang Feilong Jiang
              fjiang Feilong Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: