[Bug 483] New: Shark miscompiles sun.misc.Unsafe::getByte

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Mon May 3 03:09:20 PDT 2010


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=483

           Summary: Shark miscompiles sun.misc.Unsafe::getByte
           Product: IcedTea
           Version: 6-hg
          Platform: all
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Shark
        AssignedTo: unassigned at icedtea.classpath.org
        ReportedBy: xerxes at zafena.se


Testcase:
cd openjdk/jdk/test/java/nio/Buffer
javac CopyDirectMemory.java
java CopyDirectMemory

Shark Outputs:
 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71
Exception in thread "main" java.lang.RuntimeException:
java.nio.DirectByteBuffer[pos=1049600 lim=1049600 cap=1049600]: Expected
''=0xfffffffffffffffc, got 'ü'=0xfc
        at Basic.fail(Basic.java:94)
        at Basic.fail(Basic.java:102)
        at Basic.ck(Basic.java:114)
        at CopyDirectByteMemory.test(CopyDirectByteMemory.java:59)
        at CopyDirectMemory.main(CopyDirectMemory.java:38)


By using -Xcomp -XX:CompileOnly=sun.misc.Unsafe::getByte makes me able to
verify that the miscompilation happens in sun.misc.Unsafe::getByte

xerxes at xerxes-J464X:~/icedtea6-1.8-shark-llvm2.7/openjdk/jdk/test/java/nio/Buffer$
java -Xcomp -XX:CompileOnly=sun.misc.Unsafe::getByte -XX:+SharkTraceInstalls
CopyDirectMemory 
 [0xa6e010-0xa6e1a8): sun.misc.Unsafe::getByte (408 bytes code)
 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71
Exception in thread "main" java.lang.RuntimeException:
java.nio.DirectByteBuffer[pos=1049600 lim=1049600 cap=1049600]: Expected
''=0xfffffffffffffffc, got 'ü'=0xfc
        at Basic.fail(Basic.java:94)
        at Basic.fail(Basic.java:102)
        at Basic.ck(Basic.java:114)
        at CopyDirectByteMemory.test(CopyDirectByteMemory.java:59)
        at CopyDirectMemory.main(CopyDirectMemory.java:38)


Testcase works fine using Zero.


-- 
Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the distro-pkg-dev mailing list