[kaffe] Asking jit (x86) experts

Nicolas Geoffray nicolas.geoffray at menlina.com
Sun Jan 15 05:18:43 PST 2006


Hi everyone,

I'm the maintainer of a research prototype jvm, and I'm confronted with 
a nasty bug with it. I checked if kaffe had the same incorrect behaviour 
(version 1.1.6), and it does. So it might be interesting for both of us 
if I share the issue :)

The problem comes with eclipse, I didn't found any other application 
that leads to it. During the startup of eclipse, some native code is 
called (for gtk and gtk callbacks in our case), and this native code 
manages to loose (apparently for my vm and kaffe), the frame pointer 
(ebp in x86). You can easely realize it by placing a (new 
Exception()).printStackTrace() call in the method 
org.eclipse.swt.graphics.Device.logProc line 560 of Device.java (what i 
simply did instead of recompiling eclipse was unzipping swt.jar, 
compiling Device.java, and recreating swt.jar with the new Device.class).

The output for both of our vms (in x86) is:
java.lang.Exception
   at org.eclipse.swt.graphics.Device.logProc (Device.java:560)

And this is it... uncool :)

For info, sun, ibm and blackdown produce a good stack trace :
java.lang.Exception
       at org.eclipse.swt.graphics.Device.logProc(Device.java:560)
       at org.eclipse.swt.internal.gtk.OS.gtk_container_add(Native Method)
       at 
org.eclipse.swt.widgets.Composite.createHandle(Composite.java:211)
       at org.eclipse.swt.widgets.Shell.createHandle(Shell.java:502)
       at org.eclipse.swt.widgets.Widget.createWidget(Widget.java:321)
       at org.eclipse.swt.widgets.Control.createWidget(Control.java:306)
       at 
org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:146)
       at 
org.eclipse.swt.widgets.Decorations.createWidget(Decorations.java:236)
       at org.eclipse.swt.widgets.Shell.<init>(Shell.java:241)
       at org.eclipse.swt.widgets.Shell.<init>(Shell.java:226)
       at 
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:75)
       at 
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) 

       at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) 

       at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) 

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) 

       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) 

       at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) 

       at java.lang.reflect.Method.invoke(Method.java:391)
       at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
       at org.eclipse.core.launcher.Main.run(Main.java:704)
       at org.eclipse.core.launcher.Main.main(Main.java:688)


I don't have this problem with powerpc (my vm has a jit for x86 and 
ppc), only on x86. I'm not an expert on x86 assembler, so I was 
wondering if any of you jit/jit3 experts had an idea on the issue.


Cheers,
Nicolas





More information about the kaffe mailing list