Failed AVER when erroneously declaring the type of a &rest var as NUMBER
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Medium
|
Unassigned |
Bug Description
What I do:
(defun test (&rest definitely-a-list)
(declare (type number definitely-a-list))
definitely-
What happens:
failed AVER:
(NOT (FUNCTIONAL-
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://
[Condition of type SB-INT:BUG]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING {BBF7BB9}>)
Backtrace:
0: (SB-INT:BUG "~@<failed AVER: ~2I~_~A~
1: (SB-IMPL:
2: (SB-C::
3: (SB-C::DELETE-BLOCK #<SB-C::CBLOCK 4 :START c1 {E9BE609}> NIL)
4: (SB-C::
5: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME (SB-C::XEP TEST) {E9C7E91}> NIL)
6: (SB-C::
7: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME (SB-C::XEP TEST) {E9C7E91}>)
8: (SB-C::
9: (SB-C::%COMPILE ..)[:EXTERNAL]
10: ((LAMBDA ()))
11: ((FLET SB-THREAD:
12: ((FLET #:WITHOUT-
13: (SB-THREAD:
14: ((FLET SB-C::WITH-IT))
15: (SB-C::
16: (SB-C:COMPILE-
17: (SB-IMPL:
18: (SB-INT:
19: (SB-INT:
20: (SB-INT:
21: (SB-INT:
22: (SWANK::EVAL-REGION "\n(defun test (&rest definitely-
23: ((LAMBDA ()))
24: (SWANK:
25: ((LAMBDA ()))
26: (SWANK:
27: ((LAMBDA ()))
28: (SWANK-
29: (SWANK:
30: (SWANK::REPL-EVAL "\n(defun test (&rest definitely-
31: (SWANK:
32: (SB-INT:
33: (SWANK:
34: (SWANK:
35: ((LAMBDA ()))
36: ((LAMBDA ()))
37: (SWANK-
38: ((FLET SWANK-BACKEND:
39: (SWANK-
40: ((LAMBDA ()))
41: (SWANK:
42: ((FLET #:FORM-
43: (SWANK:
44: (SWANK::REPL-LOOP #<SWANK::CONNECTION {ACF2999}>)
45: ((LAMBDA ()))
46: (SWANK:
47: ((LAMBDA ()))
48: ((FLET #:WITHOUT-
49: ((FLET SB-THREAD:
50: ((FLET #:WITHOUT-
51: (SB-THREAD:
52: (SB-THREAD:
53: ("foreign function: #x8067E5B")
54: ("foreign function: #x805300D")
55: ("foreign function: #x805EBE0")
56: ("foreign function: #xB7FB496E")
What I expected to happen:
A "normal" compile-time error saying something like: "Erroneous declared type NUMBER for &rest var DEFINITELY-A-LIST".
SBCL version: 1.0.42
uname -a: Linux dynamorph 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux
*features*:
(:SWANK :QUICKLISP :SB-BSD-
:COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
:SB-EVAL :SB-SOURCE-
:SB-THREAD :LARGEFILE :GENCGC :STACK-
:C-STACK-
:RAW-INSTANCE-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-
:OS-PROVIDES-
tags: | added: ir1 |
tags: |
added: compiler-ir1 removed: ir1 |
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → Triaged |
On HEAD, I get this infamous error instead
debugger invoked on a SIMPLE-ERROR in thread BUILT-IN- CLASSOID FUNCTION (read-only)>
#<THREAD "main thread" RUNNING {1003780E23}>:
attempt to dump invalid structure:
#<SB-C::CLAMBDA
:%SOURCE-NAME TEST
:%DEBUG-NAME NIL
:KIND :DELETED
:TYPE #<SB-KERNEL:
:WHERE-FROM :DEFINED
:VARS (DEFINITELY-A-LIST #:REST-CONTEXT-0 #:REST-COUNT-1) {1004E5F5C3}>
How did this happen?