SUGGESTED FIX
diff fix/awt_Cursor.c src/solaris/native/sun/awt/awt_Cursor.c
109c109
< (*env)->CallVoidMethod(env, jCur, cursorIDs.mSetPData, (jlong)xcursor);
---
> (*env)->CallVoidMethod(env, jCur, cursorIDs.mSetPData, xcursor);
|
|
|
EVALUATION
4525839 (eliminate use of finalizers) introduced new method setPData (long pData) in class Cursor. In MToolkit it is called from native getCursor() via JNI call:
(*env)->CallVoidMethod(env, jCur, cursorIDs.mSetPData, xcursor);
The problem is xcursor's width, that is 32-bit int. setPData expects 64-bit value as an argument. On little-endian arch the four most significant bytes of parameter receive incorrect values. On big-endian arch xcursor's value is assigned to four most significant bytes of pData, and four least significant bytes receive random values. When pData's value is assigned to 32-bit var again, on big-endian it receives incorrect value from four least significant bytes. Hence, the issue appears on sparc.
|
|
|
EVALUATION
MToolkit was not implemented in such a way that sun.java2d.Disposer / CursorDisposer methods work for it.
|
|
|
EVALUATION
introduced by 4525839.
|
|
|
WORK AROUND
use the XToolkit (default in Java SE 6)
|
|
|
|