compile-file goes into debugger
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
compile-file went into the debugger on a lisp file generated by our Specware system. I was able to reproduce it with a small file in a bare sncl containing the following three s-exprs:
(in-package :cl-user)
(defun ppTerm (x1) #'(lambda (x2) (ppTerm-1-1 x1 x2)))
(defun ppTerm-1-1 (tm yyy-1)
(let ((mf (ppTerm tm)))
(let ((ma (ppTerm tm)))
(cons (funcall mf yyy-1)
(funcall ma yyy-1)))))
Here is the transcript of compiling this:
> sbcl
This is SBCL 1.1.12, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (compile-file "~/Dropbox/
; compiling file "/Users/
; compiling (IN-PACKAGE :CL-USER)
; compiling (DEFUN PPTERM ...)
; compiling (DEFUN PPTERM-1-1 ...)
debugger invoked on a TYPE-ERROR:
The value
#<CAST
:%TYPE-CHECK T
:VALUE #<SB-C::LVAR 1 {1002AD9BD3}>
:
:
{1002ADE853}>
is not of type
SB-C::REF.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-C::
0]
> uname -a
Darwin dhcp216.kestrel.edu 12.5.0 Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
This definition of combination- fun-source- name looks through casts and fixes the bug. I'm more worried that we have anything but a reference to a leaf as a combination-fun; is that a newly broken invariant? Some bisection might help pinpoint whether this is a regression.
(defun combination- fun-source- name (combination &optional (errorp t))
(leaf- has-source- name-p (setf leaf (ref-leaf uses))))
(let ((uses (principal-lvar-use (combination-fun combination)))
leaf)
(cond ((and (ref-p uses)
(values (leaf-source-name leaf) t))
(errorp
(aver (not "COMBINATION-FUN is not a ref to a nameful leaf")))
(t
(values nil nil)))))