[kaffe] Re: circular linking difficulties

Helmer Krämer hkraemer at freenet.de
Tue Jun 29 01:07:40 PDT 2004


On Mon, 28 Jun 2004 17:17:35 -0400 (EDT)
rob at kaffe.org wrote:

Hi Rob,

> > What puzzles me is that we already have the CSTATE_DOING_LINK phase
> > during class loading, which seems to be what you want
> [ rest of paragraph deleted ]
> 
> I agree, but it doesn't seem to be working.  Kaffe is definitely choking
> when a getClassFromSignature call calles loadClass to be called on a class
> that is in the process of verification already.  I have no idea why the
> CSTATE_DOING_LINK isn't working...

I'm pretty sure that we'll find out what's going wrong here ;)

When running ant 1.6.0, I get the following error:

considering method org/apache/tools/ant/Task.getReplacement()Lorg/apache/tools/ant/UnknownElement;
  verifying method getReplacement
[...]
blockNum/first pc/changed/stksz = 1 / 7 / 1 / 0
          before:
                 locals:
                     0: (16)org/apache/tools/ant/Task
                 opstack (0):
                     0: (0)TUNSTABLE
                     1: (0)TUNSTABLE
                     2: (0)TUNSTABLE
                     3: (0)TUNSTABLE
        about to verify the block...
        block->startAddr = 7, block->lastAddr = 127, first instruction = 42
[...]
            pc = 30, opcode = 182 == INVOKEVIRTUAL
                calling method setProject(Lorg/apache/tools/ant/Project;)V
                typechecking (16)org/apache/tools/ant/ProjectComponent  vs.  (4)Lorg/apache/tools/ant/UnknownElement;
                required receiver type: (16)org/apache/tools/ant/ProjectComponent
                actual   receiver type: (16)NULL
                error with method invocation, pc = 30, method = setProject(Lorg/apache/tools/ant/Project;)V

                some problem with a method call...here's the block:
                locals:
                    0: (16)org/apache/tools/ant/Task
                opstack (2):
                    0: (16)NULL
                    1: (4)Lorg/apache/tools/ant/Project;
                    2: (0)TUNSTABLE
                    3: (0)TUNSTABLE
    Verify Method 3b: org/apache/tools/ant/Task.getReplacement()Lorg/apache/tools/ant/UnknownElement;: FAILED
    cleaning up... done

Since ProjectComponent is a super class of UnknownElement, the typecheck
should succeed. Exactly why this error leads to a ClassCircularityError
later on, is another interesting question.

Regards,
Helmer




More information about the kaffe mailing list