DESCRIBE fails on closed-over functions

Bug #824974 reported by Elias Martenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Evaluate the following from the REPL:

* (let ((x 0)) (defun foo () (incf x)))
* (describe 'foo)

After doing this, the following error appears:

debugger invoked on a SB-INT:BUG in thread #<THREAD "initial thread" RUNNING
                                              {1002900F21}>:
    Don't know how to use a DEBUG-SOURCE without a namestring or a form.
  This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
  corrupted by bad user code, e.g. by an undefined Lisp operation like
  (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe
  Lisp code; or there might be a bug in the OS or hardware that SBCL is running
  on.) If it seems to be a bug in SBCL itself, the maintainers would like to
  know about it. Bug reports are welcome on the SBCL mailing lists, which you
  can find at <http://sbcl.sourceforge.net/>.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-INT:BUG
 "Don't know how to use a DEBUG-SOURCE without ~
                               a namestring or a form.")
0] ^C

The bug happens on my development machine with 1.0.50, but I also reproduced it on the latest version from the source repository as of 2011-08-11.

uname -a:
Linux em-desktop 2.6.32-71.18.2.el6.x86_64 #1 SMP Wed Mar 2 14:17:40 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

The problem was also seen on OSX 10.6.8

Content of *FEATURES*:

(:QUICKLISP :SB-BSD-SOCKETS-ADDRINFO :ASDF2 :ASDF :ASDF-UNIX :ANSI-CL
 :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
 :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86-64 :UNIX :ELF :LINUX
 :SB-THREAD :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD
 :C-STACK-IS-CONTROL-STACK :LINKAGE-TABLE :COMPARE-AND-SWAP-VOPS
 :UNWIND-TO-FRAME-AND-CALL-VOP :RAW-INSTANCE-INIT-VOPS
 :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS
 :CYCLE-COUNTER :COMPLEX-FLOAT-VOPS :FLOAT-EQL-VOPS :INLINE-CONSTANTS
 :MEMORY-BARRIER-VOPS :OS-PROVIDES-DLOPEN :OS-PROVIDES-DLADDR
 :OS-PROVIDES-PUTWC :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-SUSECONDS-T
 :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL)

Revision history for this message
Attila Lendvai (attila-lendvai) wrote :

on a related note, see also:

http://dwim.hu/gitweb/gitweb.cgi?p=sbcl;a=commit;h=678940ebed49b585f79ab1fe9788ae1b228e159b

"Added sb-ext:*suppress-print-errors* modelled after *break-on-signals*.

Extended the various print functions and cl:describe to honour its value
and try to recover after errors coming from inside these functions."

with that patch applied, he may have more luck dealing with this error with the added restarts.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → In Progress
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

commit d5ec4e5681e0dbe44b3fbd5f35df9f9bde5ee337
Author: Nikodemus Siivola <email address hidden>
Date: Sat Aug 13 14:31:17 2011 +0300

    fix DESCRIBE on compiled closures from EVAL

     lp#824974

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.