#758 regression: Verify error on ?: Operator

verified
closed-fixed
emitter (227)
9
2002-11-22
2002-10-02
Anonymous
No

With jikes 1.17 the following program causes the a verify-error

Exception in thread "main" java.lang.VerifyError: (class: Foo, method: getFooValue signature: ()I) A
ccessing value from uninitialized register 1

This under Windows XP with jdk 1.4.1 and also with jdk 1.3.1_01
It works with the javac and also with jikes 1.14

class Bar
{
public int getBarInteger()
{
return 1;
}
}

public class Foo
{
public Bar createBar()
{
return new Bar();
}

public static Foo createFoo()
{
return new Foo();
}

public static int getFooValue()
{
// This Method is not accepted
// by the Byte-Code-Verifier of the JVM
// if compiled with Jikes 1.17
Foo f = createFoo();
Bar b;
return (f == null || (b = f.createBar()) == null) ? 0 : b.getBarInteger();
}

public static void main(String[] args)
{
System.out.println(getFooValue());
}
}

Discussion

  • Eric Blake

    Eric Blake - 2002-10-02

    Yep. I'll see about fixing it.

     
  • Eric Blake

    Eric Blake - 2002-10-02
    • priority: 5 --> 9
    • labels: --> emitter
    • assigned_to: nobody --> ebblake
    • summary: Verify error on ? Operator --> regression: Verify error on ?: Operator
     
  • Eric Blake

    Eric Blake - 2002-10-02
    • status: open --> open-fixed
     
  • Eric Blake

    Eric Blake - 2002-10-02

    Committed a patch to CVS.

     
  • Eric Blake

    Eric Blake - 2002-11-22

    Verified fixed in 1.18.

     
  • Eric Blake

    Eric Blake - 2002-11-22
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks