United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6987555 JSR 292 unboxing to a boolean value fails on big-endian SPARC
JDK-6987555 : JSR 292 unboxing to a boolean value fails on big-endian SPARC

Details
Type:
Bug
Submit Date:
2010-09-27
Status:
Closed
Updated Date:
2011-04-20
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b02)

Related Reports
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
Current test.java.dyn.MethodHandlesTest fails with two errors:

JUnit version 4.4
.IIIIII..........E.E.................
Time: 48.223
There were 2 failures:
1) testUnreflectSetter(test.java.dyn.MethodHandlesTest)
java.lang.AssertionError: expected:<false> but was:<true>
        at org.junit.Assert.fail(Assert.java:74)
        at org.junit.Assert.failNotEquals(Assert.java:448)
        at org.junit.Assert.assertEquals(Assert.java:102)
        at org.junit.Assert.assertEquals(Assert.java:117)
        at test.java.dyn.MethodHandlesTest.testSetter(MethodHandlesTest.java:965)
        at test.java.dyn.MethodHandlesTest.testSetter(MethodHandlesTest.java:922)
        at test.java.dyn.MethodHandlesTest.testUnreflectSetter(MethodHandlesTest.java:903)
        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)
2) testFindSetter(test.java.dyn.MethodHandlesTest)
java.lang.AssertionError: expected:<false> but was:<true>
        at org.junit.Assert.fail(Assert.java:74)
        at org.junit.Assert.failNotEquals(Assert.java:448)
        at org.junit.Assert.assertEquals(Assert.java:102)
        at org.junit.Assert.assertEquals(Assert.java:117)
        at test.java.dyn.MethodHandlesTest.testSetter(MethodHandlesTest.java:965)
        at test.java.dyn.MethodHandlesTest.testSetter(MethodHandlesTest.java:922)
        at test.java.dyn.MethodHandlesTest.testFindSetter(MethodHandlesTest.java:908)
        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: 29,  Failures: 2

                                    

Comments
EVALUATION

On a big-endian SPARC machine an unboxed true boolean value looks like 0x01000000 but the shift is 31 bits, which results in a wrong value.
                                     
2010-09-27
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/5beba6174298
                                     
2010-10-13



Hardware and Software, Engineered to Work Together