[armedbear-ticket] [armedbear] #200: ABCL compiler fails to produce loadable fasl for XPATH
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: major | Milestone: 1.1.0 Component: compiler | Version: 1.1.0-dev Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- For the :XPATH system loaded from 2012-03-05 Quicklisp the plexippus- xpath-20110219-darcs fails to load {{{ Compiled function can't be loaded: org.armedbear.lisp.ASDF_TMP_xpath_test_11 from org.armedbear.lisp.Pathname@40f69ae7 }}} which results from the class verifier error {{{ java.lang.VerifyError: (class: org/armedbear/lisp/ASDF_TMP_xpath_test_11, method: execute signature: ()Lorg/armedbear/lisp/LispObject;) Accessing value from uninitialized register 20 at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:132) }}} -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: major | Milestone: 1.1.0 Component: compiler | Version: 1.1.0-dev Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Comment(by mevenson): Using the justIce verifier shows that the offending instruction is at position 660 of xpath_test_11.cls: {{{ Constraint violated in method 'public final org.armedbear.lisp.LispObject execute()': Instruction ALOAD constraint violated: Read-Access on local variable 20 with unknown content. InstructionHandle: 660: aload[25](2) 20 }}} -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:1> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.1.0 Component: compiler | Version: 1.1.0-dev Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Changes (by mevenson): * priority: major => blocker -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:2> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.1.1 Component: compiler | Version: 1.1.0-dev Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Changes (by https://www.google.com/accounts/o8/id?id=aitoawnthushznrlieuamks3fxvzisibfmu...): * milestone: 1.1.0 => 1.1.1 -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:3> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0-dev Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Changes (by mevenson): * milestone: 1.1.1 => 1.2.0 -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:4> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Changes (by mevenson): * version: 1.1.0-dev => 1.1.0 -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:5> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH ----------------------------------------------------+----------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: quicklisp xpath jvm-class-verify-error | ----------------------------------------------------+----------------------- Comment(by charmon): If one disables the compiler-macro for evaluate as follows, #-abcl (define-compiler-macro evaluate (xpath context &optional unordered-p) (once-only (xpath) `(evaluate-compiled (if (functionp ,xpath) ,xpath (with-cache ((,xpath :test equal) (*dynamic-namespaces* :test namespaces-match-p) (*profiling-enabled-p* :test eql)) (compile-xpath ,xpath (make-dynamic-environment *dynamic-namespaces*)))) ,context ,unordered-p))) then xpath is happy and passes tests. I haven't yet explored to see if it's the compiler-macro itself that is the problem, or what the compiler- macro is doing, but at least we can get things to run (and pass tests) by disabling the compiler-macro. Not the ideal fix, but perhaps a step in the right direction. -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:6> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Changes (by charmon): * keywords: quicklisp xpath jvm-class-verify-error => compiler-macro quicklisp xpath jvm-class-verify-error -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:7> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Comment(by ehuelsmann): Test case as identified by charmon: (defpackage :xpath-bug (:use :cl)) (in-package :xpath-bug) (xpath:with-namespaces (("" "")) (xpath:evaluate "count(html/following::text())" (cxml:parse-rod "<html></html>" (cxml-dom:make-dom-builder)))) -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:8> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Comment(by mevenson): Test case in https://gist.github.com/slyrus/5068867 -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:9> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Comment(by ehuelsmann): I'm using the following transcript to generate a failure and analyze the bytecode: CL-USER(1): :ld c:/users/erik/quicklisp/setup.lisp CL-USER(2): (ql:quickload :xpath) [1] XPATH(3): 0 ;; aborts the exception handler of non-loadable code ;; Followed by pasting: CL-USER(4): (defun my-evaluate (xpath context &optional unordered-p) (xpath::evaluate-compiled (if (functionp xpath) xpath (xpath::compile-xpath xpath (xpath::make-dynamic-environment xpath::*dynamic-namespaces*))) context unordered-p)) MY-EVALUATE CL-USER(5): (define-compiler-macro my-evaluate (xpath context &optional unordered-p) (xpath::once-only (xpath) `(xpath::evaluate-compiled (if (functionp ,xpath) ,xpath (xpath::with-cache ((,xpath :test equal) (xpath::*dynamic-namespaces* :test xpath ::namespaces-match-p) (xpath::*profiling-enabled-p* :test eql)) (xpath::compile-xpath ,xpath (xpath::make-dynamic-environment xpath::*dynamic-namespaces*)))) ,context ,unordered-p))) MY-EVALUATE CL-USER(6): (SETF JVM::*COMPILER-DEBUG* T) CL-USER(7): (COMPILE NIL '(LAMBDA () (xpath:with-namespaces (("" "")) (my-evaluate "count(html/following::text())" (cxml:parse-rod "<html></html>" (cxml-dom:make-dom-builder)))))) Search the resulting bytecode listing for output along the lines of "ALOAD (20)". The 20 produces consistently on my machine, but only locals 0 to 9 have been allocated by the compiler. (To see that, evaluate "(trace jvm ::allocate-register)" before compilation.) Next question: where does that 20 come from? So far I found out that the "ALOAD 20" command is being emitted by EMIT-PUSH-VARIABLE for a variable with name "L". -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:10> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Comment(by ehuelsmann): Forgot to mention: most of the code in the transcript is copied from https://gist.github.com/slyrus/5071736. -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:11> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -------------------------------------------------------------------+-------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: new Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Keywords: compiler-macro quicklisp xpath jvm-class-verify-error | -------------------------------------------------------------------+-------- Comment(by ehuelsmann): (In [14445]) Re #200: Rewrite form-modifying macro into a series of functional-style functions which return a modified copy instead. -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:12> armedbear <http://common-lisp.net/project/armedbear> armedbear
#200: ABCL compiler fails to produce loadable fasl for XPATH -----------------------+---------------------------------------------------- Reporter: mevenson | Owner: ehuelsmann Type: defect | Status: closed Priority: blocker | Milestone: 1.2.0 Component: compiler | Version: 1.1.0 Resolution: fixed | Keywords: compiler-macro quicklisp xpath jvm-class-verify-error -----------------------+---------------------------------------------------- Changes (by ehuelsmann): * status: new => closed * resolution: => fixed Comment: Fixed by r14441 and r14445. -- Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/200#comment:13> armedbear <http://common-lisp.net/project/armedbear> armedbear
participants (1)
-
armedbear