This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crashing Kawa with a boolean field


On Wed, Jun 18, 2003 at 08:09:56AM -0700, Per Bothner wrote:
> Jim White wrote:
> 
> >
> >The origin of that is probably gnu.bytecode.PrimType.emitCoerceToObject 
> >line 78 which is a case with this:
> >
> >      default:   cname = null;
> 
> Aha!  I have't tried the attached patch (partl;y because I don't have an 
> actual testcase, and partly because I need to get ready for a trip), so 
> I don't know if it solved the problem, it it sure seems appropriate.

It doesn't. The problem remains. My guess that, in emitCoerceToObject,
the only special case is the test of 'Z' for sig1. However, unlike 
the other cases, cname never got set. I tried to set it to 
"java.lang.Boolean" before the break statement, but the resulting code
caused 

java.lang.VerifyError: (class: atInteractiveLevel, method: dump signature:
(LEmployee;)Ljava/lang/Object;) Expecting to find integer
on stack
        at java.lang.Class.getField0(Native Method)
        at java.lang.Class.getDeclaredField(Class.java:1113)
        at gnu.expr.ModuleExp.evalToClass(ModuleExp.java:116)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:166)
        at kawa.Shell.run(Shell.java:232)
        at kawa.Shell.run(Shell.java:180)
        at kawa.Shell.run(Shell.java:167)
        at kawa.Shell.run(Shell.java:154)
        at kawa.repl.main(repl.java:609)


OK, I tried to set cname="java.lang.Integer", it bombed even more
with java.lang.NullPointerException when executing the last line 

       code.emitInvokeSpecial(method);

at the end  of the method.

I knew this is the end of my journey because I don't know JVM's 
internals.

If you need the test case, I'll send that to you.

Thanx!


Wen-Chun


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]