-
Bug
-
Resolution: Fixed
-
P3
-
1.2a, 1.2.0
-
1.2fcs
-
generic, sparc
-
solaris_2.5, solaris_2.5.1, solaris_2.6
-
Verified
Name: akC57697 Date: 09/30/98
The AWTEvent.freeNativeData() gets SEGV in JDK 1.2 FCS L.
The example fails on :
Solaris 2.5.1 without patch
Solaris 2.5.1 patched (Patches: 103600-14,103640-08)
Solaris 2.6 without patch
(not tested under patched Solaris 2.6)
Not reproducible under Win32.
The example to reproduce SEGV:
--------------------------------8-<---------------------------
import java.awt.event.*;
import java.awt.*;
public class Test {
public static void main(String[] argv) {
Component[] sources={new Canvas(), new Button("Stop")};
/**
* These values are used as parameters for InputEvent constructor
*/
int[] ids={
Integer.MIN_VALUE,
Integer.MIN_VALUE+1,
InputEvent.COMPONENT_FIRST-1,
InputEvent.COMPONENT_FIRST,
InputEvent.COMPONENT_MOVED,
InputEvent.COMPONENT_RESIZED,
InputEvent.COMPONENT_SHOWN,
InputEvent.COMPONENT_HIDDEN,
InputEvent.COMPONENT_LAST+1,
Integer.MAX_VALUE-1,
Integer.MAX_VALUE
};
/**
* These values are used as parameters for InputEvent constructor
*/
long[] whens={
Long.MIN_VALUE,
Long.MIN_VALUE+1,
0,
Long.MAX_VALUE
};
/**
* These values are used as parameters for InputEvent constructor
*/
int[] modifiers={
Integer.MIN_VALUE,
Integer.MIN_VALUE+1,
InputEvent.SHIFT_MASK,
InputEvent.CTRL_MASK ,
InputEvent.META_MASK,
InputEvent.ALT_MASK,
InputEvent.BUTTON1_MASK+InputEvent.ALT_MASK,
InputEvent.SHIFT_MASK+InputEvent.CTRL_MASK+InputEvent.ALT_MASK,
InputEvent.CTRL_MASK+InputEvent.META_MASK,
100,
Integer.MAX_VALUE-1,
Integer.MAX_VALUE
};
for (int s=0; s<sources.length; s++)
for (int i=0; i<ids.length; i++)
for (int w=0; w<whens.length; w++)
for (int m=0; m<modifiers.length; m++) {
// InputEvent is an abstract class with no public/protected
// constructors, so using KeyEvent constructor
System.out.println(s+" "+i+" "+w+" "+m);
InputEvent ev=
new KeyEvent(sources[s],ids[i],whens[w],modifiers[m],0,'c');
}
System.out.println("OKAY");
System.exit(0);
}
}
--------------------------------8-<---------------------------
java Test
......
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x0]
stackpointer=ef161248
Full thread dump Classic VM (JDK-1.2fcs-L, green threads):
"Finalizer" (TID:0xebc98320, sys_thread_t:0x699f0, state:R) prio=8
at java.awt.AWTEvent.freeNativeData(Native Method)
at java.awt.AWTEvent.finalize(Compiled Code)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Compiled Code)
at java.lang.ref.Finalizer.access$1(Compiled Code)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:175)
"Reference Handler" (TID:0xebc983b0, sys_thread_t:0x650b8, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
"Signal dispatcher" (TID:0xebc983e0, sys_thread_t:0x5e888, state:CW) prio=5
"main" (TID:0xebc981e0, sys_thread_t:0x26668, state:R) prio=5
at java.lang.String.<init>(Compiled Code)
at java.lang.Integer.toString(Compiled Code)
at java.lang.Integer.toString(Compiled Code)
at java.lang.String.valueOf(Compiled Code)
at Test.main(Compiled Code)
Monitor Cache Dump:
java.lang.ref.Reference$Lock@EBC983C0/EBCCDB20: <unowned>
Waiting to be notified:
"Reference Handler" (0x650b8)
Registered Monitor Dump:
PCMap lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "Finalizer" (0x699f0) 1 entry
Dynamic loading lock: <unowned>
Monitor IO lock: <unowned>
User signal monitor: <unowned>
Waiting to be notified:
"Signal dispatcher" (0x5e888)
Child death monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
<unknown thread> (0x2b958)
Thread queue lock: owner "Finalizer" (0x699f0) 1 entry
Monitor registry: owner "Finalizer" (0x699f0) 1 entry
SIGABRT 6* abort (generated by abort(3) routine)
si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
si_errno [0]: Error 0
si_code [0]: SI_USER [pid: 5754, uid: 302]
stackpointer=ef161248
Full thread dump Classic VM (JDK-1.2fcs-L, green threads):
"Finalizer" (TID:0xebc98320, sys_thread_t:0x699f0, state:R) prio=8
at java.awt.AWTEvent.freeNativeData(Native Method)
at java.awt.AWTEvent.finalize(Compiled Code)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Compiled Code)
at java.lang.ref.Finalizer.access$1(Compiled Code)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:175)
"Reference Handler" (TID:0xebc983b0, sys_thread_t:0x650b8, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
"Signal dispatcher" (TID:0xebc983e0, sys_thread_t:0x5e888, state:CW) prio=5
"main" (TID:0xebc981e0, sys_thread_t:0x26668, state:R) prio=5
at java.lang.String.<init>(Compiled Code)
at java.lang.Integer.toString(Compiled Code)
at java.lang.Integer.toString(Compiled Code)
at java.lang.String.valueOf(Compiled Code)
at Test.main(Compiled Code)
Monitor Cache Dump:
java.lang.ref.Reference$Lock@EBC983C0/EBCCDB20: <unowned>
Waiting to be notified:
"Reference Handler" (0x650b8)
Registered Monitor Dump:
PCMap lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "Finalizer" (0x699f0) 1 entry
Dynamic loading lock: <unowned>
Monitor IO lock: <unowned>
User signal monitor: <unowned>
Waiting to be notified:
"Signal dispatcher" (0x5e888)
Child death monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
<unknown thread> (0x2b958)
Thread queue lock: owner "Finalizer" (0x699f0) 1 entry
Monitor registry: owner "Finalizer" (0x699f0) 1 entry
======================================================================
----------------- stevef@eng 10/8/98 ----------
We are seeing a JCK test failure in our "singleJVM" test mode that looks
like the "AWTEvent.freeNativeData" problem. We see this repeatedly on "M".
We have quite a few test cases that create AWTEvents, so this may be
difficult for us to work around. "singleJVM" test mode tends to exercise
garbage collection.