bug-jel
[Top][All Lists]
Advanced

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

[Bug-jel] java.lang.VerifyError


From: Mark Taylor
Subject: [Bug-jel] java.lang.VerifyError
Date: Mon, 16 Nov 2020 18:21:04 +0000 (GMT)
User-agent: Alpine 2.21 (DEB 202 2017-01-01)

Dear Konstantin,

I think I have encountered a (weird) JEL bug.

If I compile and run the following program against (e.g.) JEL 2.1.1:

    import gnu.jel.Evaluator;
    import gnu.jel.Library;

    public class Jelly3 {

        public static void main(String[] args) throws Throwable {
            Library lib = new Library(new Class[] {Jelly3.ALib.class},
                                      null, null, null, null);

            // These calls work OK:
            Evaluator.compile("dx==1", lib, null);
            Evaluator.compile("dx==1", lib, Boolean.class);
            Evaluator.compile("ix==1", lib, null);

            // But this one causes a java.lang.VerifyError:
            Evaluator.compile("ix==1", lib, Boolean.class);
        }

        public static class ALib {
            public static double dx() {
                return 1.0;
            }
            public static int ix() {
                return 1;
            }
        }
    }

I see this error:

    Exception in thread "main" java.lang.VerifyError: (class: dump, method: 
evaluate signature: ([Ljava/lang/Object;)Ljava/lang/Object;) Expecting to find 
unitialized object on stack
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
            at java.lang.Class.getConstructor0(Class.java:3075)
            at java.lang.Class.newInstance(Class.java:412)
            at gnu.jel.Evaluator.compile(Evaluator.java:158)
            at Jelly3.main(Jelly3.java:16)

Any ideas?

Many thanks,

Mark

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor@bris.ac.uk +44-117-9288776  http://www.star.bris.ac.uk/~mbt/



reply via email to

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