Discussion:
Compiler fail: Stack inconsistency detected in <unknown> at index 40: found 2, expected 0.
Paul Dietz
2017-10-03 16:14:27 UTC
Permalink
(defparameter *abcl1*
'(lambda (a)
(declare (optimize (debug 0) (compilation-speed 1)
(speed 2) (space 3) (safety 1)))
(ash 0
(bit #*0100
(catch 'ct7 a)))))

(defun test1 ()
(let ((fn (compile nil *abcl1*)))
(mapcar fn '(0 1 2 3))))

(test1) ==>

; Caught ERROR:
; Stack inconsistency detected in <unknown> at index 40: found 2,
expected 0.
Mark Evenson
2017-10-06 11:08:05 UTC
Permalink
Post by Paul Dietz
(defparameter *abcl1*
'(lambda (a)
(declare (optimize (debug 0) (compilation-speed 1)
(speed 2) (space 3) (safety 1)))
(ash 0
(bit #*0100
(catch 'ct7 a)))))
(defun test1 ()
(let ((fn (compile nil *abcl1*)))
(mapcar fn '(0 1 2 3))))
(test1) ==>
; Stack inconsistency detected in <unknown> at index 40: found 2,
expected 0.
Confirmed as an issue [github][].

Working on a proposal to be more comprehensive in fixing these problems
by changing the bytecode format we emit. We currently only produce
classfiles of the "49.0" format, whereas Java6 introduced a major
overhaul how verification is done for the serialization which should
help eliminate these kinds of errors. The new bytecode specification is
essentially derived from a Prolog specification that--if we are
clever--could be easily "followed" by ABCL.

Thanks for the report!

Glad you are at least trying to use the Bear.


[github]: https://github.com/armedbear/abcl/issues/69
[abcl.org]: http://abcl.org/trac/ticket/453
--
"A screaming comes across the sky. It has happened before, but there
is nothing to compare to it now."
Loading...