[Openmcl-devel] Issue: improper insistence on fixnum type #171
Gilbert Baumann
gilbert at bauhh.de
Mon Feb 13 10:06:02 PST 2023
Hello,
I looked into before-mentioned issue on github. The smallest test case
exposing this bug that I could find is like the following:
(DEFUN BUG ()
(DECLARE (OPTIMIZE (SPEED 1) (SAFETY 3) (DEBUG 1) (COMPILATION-SPEED 0)))
(LET ((X 0))
(LABELS ((FOO () (1+ X)))
(SETQ X PI)
(1+ X))))
I get
(bug)
=> #<BOGUS object @ #x302001E0E255>
Which is bad. It goes away with (COMPILATION-SPEED 3). Remove the
LABELS and the bug disappears.
I nailed that down to the following change:
<https://github.com/Clozure/ccl/commit/bed5cf811ae157298903036276c079e336ae1cf9>
diff --git a/compiler/nx0.lisp b/compiler/nx0.lisp
index 110c6c41..15101941 100644
--- a/compiler/nx0.lisp
+++ b/compiler/nx0.lisp
@@ -1599,7 +1599,7 @@ Or something. Right? ~s ~s" var varbits))
(with-program-error-handler (lambda (c) (runtime-program-error-form c))
(parse-body (%cddr lambda-form) *nx-lexical-environment* t))
(setf (afunc-acode p) (nx1-lambda (%cadr lambda-form) body decls)))))
-
+ (rewrite-acode-form (afunc-acode p))
(nx1-transitively-punt-bindings *nx-punted-vars*)
(setf (afunc-blocks p) *nx-blocks*)
(setf (afunc-tags p) *nx-tags*)
I suggest until we find the real issue with REWRITE-ACODE-FORM, we
disable it, if we can.
--
Gilbert.
More information about the Openmcl-devel
mailing list