Opened 11 months ago

#482 new defect

LOADing .abcl file with *READ-BASE* bound fails

Reported by: Eric Timmons Owned by:
Priority: minor Milestone:
Component: other Version: 1.8.1-dev
Keywords: Cc:
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))

(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]

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

  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__._

Change History (0)

Note: See TracTickets for help on using tickets.