[armedbear] #482: LOADing .abcl file with *READ-BASE* bound fails

armedbear armedbear-devel at common-lisp.net
Sun Nov 29 16:11:22 UTC 2020


#482: LOADing .abcl file with *READ-BASE* bound fails
----------------------------+--------------------
      Reporter:  etimmons   |       Type:  defect
        Status:  new        |   Priority:  minor
     Milestone:             |  Component:  other
       Version:  1.8.1-dev  |   Keywords:
Parent Tickets:             |
----------------------------+--------------------
 Full disclosure: I don't have any code actually affected by this. I just
 ran into it while trying to better figure out #481.

 Test procedure:

 {{{
 (defvar *file-name* "file-2")

 (defun write-test-file (num)
   (let ((pn (merge-pathnames *file-name* (make-pathname :type "lisp"))))
     (with-open-file (f pn
                        :direction :output
                        :if-exists :supersede)
       (prin1 `(defun test () ,num) f))
     pn))

 (let ((pn (write-test-file 10))
       (*read-base* 2))
   (load (compile-file pn)))

 (assert (= (test) 2) nil "Got ~D, expected 2" (test))
 }}}

 Results in:

 {{{
 The variable |43| is unbound.
    [Condition of type UNBOUND-VARIABLE]

 Restarts:
  0: [RETRY] Retry SLIME REPL evaluation request.
  1: [*ABORT] Return to SLIME's top level.
  2: [ABORT] Abort thread.

 Backtrace:
   0: (INVOKE-DEBUGGER #<UNBOUND-VARIABLE |43| {6545B09F}>)
   1: (SYSTEM::%LOAD #P"/tmp/abcl/file-2.abcl" NIL NIL T :DEFAULT)
   2: (LOAD #P"/tmp/abcl/file-2.abcl")
   3: (SYSTEM::%LOAD #P"/tmp/abcl/file-1.lisp" NIL NIL T :DEFAULT)
   4: (LOAD "file-1.lisp")
   5: (SYSTEM::%EVAL (LOAD "file-1.lisp"))
   6: (EVAL (LOAD "file-1.lisp"))
 }}}

 Looks like it's choking on the literal number in the SYS:INIT-FASL form in
 {{{__loader__._}}}

-- 
Ticket URL: <https://abcl.org/trac/ticket/482>
armedbear <https://abcl.org>
armedbear


More information about the armedbear-ticket mailing list