Curious verifier error

Nic Ferrier nferrier@tapsellferrier.co.uk
Mon Jan 28 11:05:00 GMT 2002


Tom Tromey <tromey@redhat.com> writes:

> Tom> I'll write a patch today. 
>  
> I just checked in the patch. 
> I wrote a small program to test it and it seems ok. 
> Nic, care to update and give it a try? 

Will do. I'll post results later.


It's one of those annoying errors isn't it? I had a similar thing a
few weeks ago:


  void someMethod(Long one, Long two)
  {
     Long someValue = new Long(10);
     .
     .
     .
     if (someCondition && (one == someValue))
        {
          .
          .
          .
        }
   }

and of course the if test failed. I didn't even spot the problem when
I looked at the byte code and saw an aifeq instruction.

It made me think that maybe a compiler like GCJ should add
"dummy-mode" where things like equality checks are flagged at compile
time. GCC does similar things for C programmers doesn't it?



Nic



More information about the Java mailing list