classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling with jikes > 1.13


From: Mark Wielaard
Subject: Re: Compiling with jikes > 1.13
Date: 07 Feb 2002 01:09:54 +0100

On Wed, 2002-02-06 at 23:12, Tom Tromey wrote:
> >>>>> "Mark" == Mark Wielaard <address@hidden> writes:
> 
> Mark> I am interested in how your fix looks.
> 
> It is basically the same as your fix, except I added a type::isnull()
> method.

It looks like that does not solve all problems with null arrays.
The following program gives a verify error but I am to tired to figure
out what goes wrong (both with jikes and gcj -C).

import java.io.InterruptedIOException;
public class NullArray
{
  public static void main(String[] args)
  {
    InterruptedIOException[] s = null;
    int i = s[0].bytesTransferred;
  }
}

$ gcj -C NullArray.java
$ ./verifyclass NullArray.class
java.lang.VerifyError: verification failed at PC 5 in
NullArray:main(([Ljava.lang.String;)V): incompatible type on stack

Method name:"main" public static Signature: 6=(java.lang.String[])void
Attribute "Code", length:38, max_stack:2, max_locals:3, code_length:10
  0: aconst_null
  1: astore_1
  2: aload_1
  3: iconst_0
  4: aaload
  5: getfield #13=<Field java.io.InterruptedIOException.bytesTransferred
int>
  8: istore_2
  9: return

I will get some sleep now. Happy verifier hacking.

Good night,

Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]