Eric Marsden | 1 Nov 2008 12:55
Picon
Favicon

Compilation triggers jvm stack inconsistency

Hi,

Compiling the following code triggers a stack inconsistency error in
ABCL. Note that the bug is difficult to trigger: the UNWIND-PROTECT is
necessary, as are the inline declaration and the call from an
undefined function. 

(defun foo ()
  (flet ((bar () (unwind-protect 1 2)))
    (declare (inline bar))
    (undefined (bar))))

,----
| CL-USER(2): (compile-file "a")
| ; Compiling /home/emarsden/a.lisp ...
| ; (IN-PACKAGE :CL-USER)
| ; (DEFUN FOO ...)
| Stack inconsistency at index 24: found 3, expected 1.
| java.lang.VerifyError: (class: org/armedbear/lisp/a_1, method: execute signature:
()Lorg/armedbear/lisp/LispObject;) Inconsistent stack height 1 != 3
| 	at java.lang.Class.getDeclaredConstructors0(Native Method)
| 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
| 	at java.lang.Class.getConstructor0(Class.java:2716)
| 	at java.lang.Class.getConstructor(Class.java:1674)
| 	at org.armedbear.lisp.Lisp.loadCompiledFunction(Lisp.java:1135)
| 	at org.armedbear.lisp.Lisp.loadCompiledFunction(Lisp.java:1062)
| 	at org.armedbear.lisp.CompiledFunction$1.execute(CompiledFunction.java:174)
| 	at org.armedbear.lisp.Symbol.execute(Symbol.java:708)
| 	at org.armedbear.lisp.LispThread.execute(LispThread.java:626)
| 	at org.armedbear.lisp.compile_file_4.execute(compile-file.lisp:51)
(Continue reading)

Mark Evenson | 3 Nov 2008 08:05
Picon
Favicon

Re: Compilation triggers jvm stack inconsistency

Eric Marsden wrote:
> Hi,
> 
> Compiling the following code triggers a stack inconsistency error in
> ABCL. Note that the bug is difficult to trigger: the UNWIND-PROTECT is
> necessary, as are the inline declaration and the call from an
> undefined function. 
> 
> (defun foo ()
>   (flet ((bar () (unwind-protect 1 2)))
>     (declare (inline bar))
>     (undefined (bar))))

Logged as [ticket 21][1].

[1]: http://trac.common-lisp.net/armedbear/ticket/21

Thanks for the bug report!

Mark <evenson <at> panix.com>

--

-- 
"A screaming comes across the sky.  It has happened before, but there is
nothing to compare to it now."

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)


Gmane