[cmucl-imp] Function with declared result type NIL returned.

Mark Cox markcox80 at gmail.com
Tue Jun 14 23:49:08 UTC 2016


G'day,

I think there may be an issue with the way CMUCL handles return values.

I'm having trouble developing a reduced test case so I have attached the
code I encountered the issue with. The code relies on an external library
titled external-program.

I'm using cumcl-2016-06-x86-darwin.

Thanks
Mark

;; $ git clone https://github.com/sellout/external-program.git
;; $ cd external-program && git checkout 9f6d518
;; $ cmucl -noinit -load issue.lisp

;; issue.lisp
(in-package "CL-USER")

(eval-when (:compile-toplevel :load-toplevel :execute)
  (require :asdf))

(eval-when (:compile-toplevel :load-toplevel :execute)
  (push (merge-pathnames "external-program/") asdf:*central-registry*)
  (asdf:load-system "external-program"))

(defun test ()
  (print (lisp-implementation-type))
  (print (lisp-implementation-version))
  (terpri)
  (external-program:start "/bin/ls" (list "-la") :output *standard-output*))

(unwind-protect (test)
  (uiop:quit))

;; $ cmucl -noinit -load issue.lisp
;; "CMU Common Lisp"
;; "snapshot-2016-06 (21A Unicode)"

;; Function with declared result type NIL returned:
;;   (PCL:FAST-METHOD EXTERNAL-PROGRAM:START (T T))
;;    [Condition of type KERNEL:SIMPLE-CONTROL-ERROR]

;; Restarts:
;;   0: [CONTINUE] Return NIL from load of "issue.lisp".
;;   1: [ABORT   ] Skip remaining initializations.

;; Debug  (type H for help)

;; ("LAMBDA (.KEYARGS-START. .VALID-KEYS. G3148)" #<unused-arg>
#<unused-arg>
;;  "/bin/ls" ("-la") ...)
;; Source: (FUNCALL (THE FUNCTION #'(PCL:FAST-METHOD EXTERNAL-PROGRAM:START
#))
;;                  (PCL::FAST-METHOD-CALL-PV-CELL #:G3148)
;;                  (PCL::FAST-METHOD-CALL-NEXT-METHOD-CALL #:G3148)
;;                  PCL::.ARG0.
;;                  ...)
;; 0] total 16
;; drwxr-xr-x   5 hungry  wheel   170 15 Jun 09:20 .
;; drwxrwxrwt  37 root    wheel  1258 15 Jun 09:20 ..
;; -rw-r--r--   1 hungry  wheel   634 15 Jun 09:20 issue.lisp
;; drwxr-xr-x   8 hungry  wheel   272 15 Jun 09:20 external-program


More information about the cmucl-imp mailing list