interrupt causing infinite loop after type error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Medium
|
Unassigned |
Bug Description
[As far as I know this is not the same as #404441. Otherwise,
my apologies.]
The following small example illustrates how interrupts can cause an
infinite loop that requires killing the session.
=======
* (defun fib (n)
(if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))
FIB
* (trace fib)
(FIB)
* (fib 30)
0: (FIB 30)
1: (FIB 29)
....
<Interrupt with control-c>
0 ; to continue
<Interrupt with control-c>
0 ; to continue
; Then we get a type error followed by an infinite loop, as shown
; below.
0] 0
debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
The value -22 is not of type (MOD 536870909).
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-IMPL:
#<SB-SYS:FD-STREAM for "standard output" {A9F6661}>)
0]
debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
The value NIL is not of type SB-IMPL::BUFFER.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-IMPL:
#<SB-SYS:FD-STREAM for "standard output" {A9F6661}>)
0[2]
=======
Additional information, as requested by SBCL bug reporting guidelines:
lhug-8:~> sbcl-1.0.40 --version
SBCL 1.0.40
lhug-8:~> uname -a
Linux lhug-8.
lhug-8:~> sbcl-1.0.40
This is SBCL 1.0.40, 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.
* *features*
(:ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS
:SB-UNICODE :SB-EVAL :SB-SOURCE-
:LINUX :SB-THREAD :LARGEFILE :GENCGC :STACK-
:C-STACK-
:RAW-INSTANCE-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :LINKAGE-TABLE :OS-PROVIDES-DLOPEN
:OS-PROVIDES-PUTWC :OS-PROVIDES-
*
Confirmed on un-threaded x86-64 Darwin.