JDK-8144828 : Marlin renderer causes unaligned write accesses
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • CPU: sparc
  • Submitted: 2015-12-07
  • Updated: 2016-01-07
  • Resolved: 2015-12-09
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
9 b100Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The code pushed with JDK-8143849 crashes SPECjvm2008 on SPARC because it calls Unsafe.putInt() with an unaligned address (0x10102657a is not Integer aligned).

http://hg.openjdk.java.net/jdk9/client/jdk/file/73b93c545ceb/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java#l474

Steps to reproduce:
java -jar ./SPECjvm2008.jar --showversion startup.helloworld -ikv

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0xfffffffc6a433e4c, pid=17795, tid=2
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 9-internal+0-2015-12-07-011940.tohartma.hs-comp)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9-internal+0-2015-12-07-011940.tohartma.hs-comp, mixed mode, tiered, compressed oops, g1 gc, solaris-sparc)
# Problematic frame:
# V  [libjvm.so+0x1133e4c]  Unsafe_SetNativeInt+0x15c
#
# Core dump will be written. Default location: /tmp/tohartma/refworkload/benchmarks/specjvm2008/core or core.17795
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 1128  jdk.internal.misc.Unsafe.putInt(JI)V (0 bytes) @ 0xffffffff6446bf4c [0xffffffff6446bee0+0x000000000000006c]
j  sun.java2d.marlin.MarlinCache.copyAARowRLE_WithBlockFlags([I[IIII)V+377
J 1259 C1 sun.java2d.marlin.Renderer.copyAARow([IIIIZ)V (69 bytes) @ 0xffffffff5d756e68 [0xffffffff5d756bc0+0x00000000000002a8]
J 1277 C1 sun.java2d.marlin.Renderer._endRendering(II)V (2400 bytes) @ 0xffffffff5d76b4bc [0xffffffff5d766780+0x0000000000004d3c]
j  sun.java2d.marlin.Renderer.endRendering(I)V+49
j  sun.java2d.marlin.Renderer.endRendering()Z+368
[...]
Comments
I verified that your fix solves the issue on Solaris SPARC.
08-12-2015

Could you test the proposed patch ? http://cr.openjdk.java.net/~lbourges/marlin/marlin-8144828.0/ See RFR: http://mail.openjdk.java.net/pipermail/2d-dev/2015-December/006005.html
07-12-2015