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

JSR 292 MethodHandlesTest.testCastFailure fails on SPARC with -Xcomp +DeoptimizeALot

XMLWordPrintable

    • b06
    • generic
    • generic
    • Verified

        After fixing 6990933 another error surfaced.

        On 64-bit SPARC:

        $ gamma -Xcomp -XX:+DeoptimizeALot -XX:-PrintVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp /java/devtools/share/junit/latest/junit.jar:. org.junit.runner.JUnitCore test.java.dyn.MethodHandlesTest
        JUnit version 4.4
        .IIIIII...........................E..
        Time: 16.508
        There was 1 failure:
        1) testCastFailure(test.java.dyn.MethodHandlesTest)
        java.lang.InternalError: unexpected code -1: required class java.lang.Integer but encountered class java.lang.String
                at sun.dyn.MethodHandleImpl.raiseException(MethodHandleImpl.java:1247)
                at sun.dyn.FilterOneArgument.invoke(FilterOneArgument.java:50)
                at test.java.dyn.MethodHandlesTest.testCastFailure(MethodHandlesTest.java:1917)
                at test.java.dyn.MethodHandlesTest.testCastFailure(MethodHandlesTest.java:1825)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:613)
                at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
                at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
                at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
                at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
                at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
                at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
                at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
                at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
                at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
                at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
                at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
                at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
                at org.junit.internal.runners.CompositeRunner.runChildren(CompositeRunner.java:33)
                at org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java:28)
                at org.junit.runner.JUnitCore.run(JUnitCore.java:130)
                at org.junit.runner.JUnitCore.run(JUnitCore.java:109)
                at org.junit.runner.JUnitCore.run(JUnitCore.java:100)
                at org.junit.runner.JUnitCore.runMain(JUnitCore.java:81)
                at org.junit.runner.JUnitCore.main(JUnitCore.java:44)

        FAILURES!!!
        Tests run: 30, Failures: 1


        On 32-bit SPARC:

        JUnit version 4.4
        .IIIIII...........................==============================================================================
        Unexpected Error
        ------------------------------------------------------------------------------
        SIGSEGV (0xb) at pc=0xfb980884, pid=8817, tid=2

        Do you want to debug the problem?

        To debug, run 'dbx - 8817'; then switch to thread 2
        Enter 'yes' to launch dbx automatically (PATH must include dbx)
        Otherwise, press RETURN to abort...
        ==============================================================================

        <snip>
         1 - frame( sp=0xfd7fe460, unextended_sp=0xfd7fe460, fp=0xfd7fe840, pc=0xfb51211c)
        java.lang.String.valueOf(String.java:2902)
         2 - frame( sp=0xfd7fe460, unextended_sp=0xfd7fe460, fp=0xfd7fe840, pc=0xfb51211c)
        java.lang.StringBuilder.append(StringBuilder.java:128)
         3 - frame( sp=0xfd7fe840, unextended_sp=0xfd7fe840, fp=0xfd7fe8c8, pc=0xfb406490)
        sun.dyn.MethodHandleImpl.raiseException(MethodHandleImpl.java:1240)
         4 - frame( sp=0xfd7fe8c8, unextended_sp=0xfd7fe8e0, fp=0xfd7fe938, pc=0xfbc771c4)
        sun.dyn.FilterOneArgument.invoke(FilterOneArgument.java:50)
         5 - frame( sp=0xfd7fe938, unextended_sp=0xfd7fe968, fp=0xfd7fe9e8, pc=0xfbd0c5e8)
        test.java.dyn.MethodHandlesTest.testCastFailure(MethodHandlesTest.java:1917)
        <snip>

        <snip>
        [8] sp=0xfd7fe400 pc=0xfdb3df50: sema_post+0x7e4 in /lib/libc.so.1 at 0xfda80000
        [9] sp=0xfd7fe460 pc=fb512114: Compiled {method} 'append' '(Ljava/lang/Object;)Ljava/lang/StringBuilder;' in 'java/lang/StringBuilder' = (CodeBlob*)0xfb511fc8
        [10] sp=0xfd7fe840 pc=0xfb406488 is an Interpreter codelet
        return entry points [0xfb405140, 0xfb408580] 13376 bytes
        [11] sp=0xfd7fe8c8 pc=fbc7727c: Compiled {method} 'invoke' '(Ljava/lang/Object;)Ljava/lang/Object;' in 'sun/dyn/FilterOneArgument' = (CodeBlob*)0xfbc77048
        [12] sp=0xfd7fe938 pc=fbd0cc4c: Compiled {method} 'testCastFailure' '(Ljava/lang/String;I)V' in 'test/java/dyn/MethodHandlesTest' = (CodeBlob*)0xfbd0c0c8
        <snip>

              twisti Christian Thalinger (Inactive)
              twisti Christian Thalinger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: