Failed AVER in subtypep
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SBCL |
Undecided
|
Unassigned |
Bug Description
(subtypep '(cons (or (simple-array ratio) simple-array) nil) nil)
==>
failed AVER: (NOT (EQ SB-KERNEL::TYPE2 SB-KERNEL:
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: [REMOVE-FD-HANDLER] Remove #<SB-IMPL::HANDLER INPUT on descriptor 4: #<FUNCTION (LABELS SWANK/SBCL::RUN :IN SWANK/BACKEND:
3: [ABORT] Exit debugger, returning to top level.
Backtrace:
0: (SB-KERNEL:
1: (SB-KERNEL:
2: (SB-KERNEL:
3: (SB-KERNEL:
4: (SB-KERNEL:
5: (SB-KERNEL:
6: (SB-KERNEL:
7: (SB-KERNEL:TYPE= #<SB-KERNEL:
8: (SB-KERNEL:
9: (SB-KERNEL:
10: (SB-KERNEL:
11: (SB-KERNEL:
12: (SB-KERNEL:
13: (SB-KERNEL:
14: (SB-KERNEL:
15: (SB-KERNEL:
16: (SB-KERNEL:
17: (SB-KERNEL:
18: (SB-KERNEL:
19: (SB-KERNEL:
20: (SB-KERNEL:
21: (SB-KERNEL:
22: (SUBTYPEP (CONS (OR (SIMPLE-ARRAY RATIO) SIMPLE-ARRAY) NIL) NIL #<unused argument>)
Paul F. Dietz (paul-f-dietz) wrote : | #1 |
On Fri 19 Feb 2021 at 13:17, "Paul F. Dietz" <email address hidden> wrote:
> To run this:
>
> 1) Get ansi-test from https:/
> 2) In the root directory of that checked out repo, start sbcl and load enough of the tests:
>
> (load "run.lsp")
cd /tmp
rm -rfv ansi-test
git clone https:/
cd ansi-test
nix-shell --pure -p sbcl
sbcl
(load "run.lsp")
; caught ERROR:
; READ error during COMPILE-FILE:
;
; Package QL does not exist.
;
; Line: 28, Column: 17, File-Position: 834
;
; Stream: #<SB-INT:
;
; compilation unit aborted
; caught 1 fatal ERROR condition
; caught 1 ERROR condition
While evaluating the form starting at line 7, column 0
of #P"/tmp/
debugger invoked on a SB-INT:
#<THREAD "main thread" RUNNING {10005184C3}>:
Couldn't load #P"/tmp/
Paul F. Dietz (paul-f-dietz) wrote : | #3 |
Arg, my .sbclrc
Paul F. Dietz (paul-f-dietz) wrote : | #4 |
That should be fixed.
Paul F. Dietz (paul-f-dietz) wrote : | #5 |
Another example:
(subtypep '(or (array ratio) sequence) t) ==> same error
Tomas Hlavaty (tomas-hlavaty) wrote : | #6 |
On Fri 19 Feb 2021 at 14:51, "Paul F. Dietz" <email address hidden> wrote:
> That should be fixed.
(load "run.lsp") works now, thanks
(load "auxilliary/
(load "auxilliary/
should be auxiliary
and then:
* (in-package :cl-test)
#<PACKAGE "CL-TEST">
* (test-mutated-types 10000 10 :reps 2)
; in: TEST-MUTATED-TYPES 10000
; (CL-TEST:
;
; caught STYLE-WARNING:
; undefined function: CL-TEST:
;
; compilation unit finished
; Undefined function:
; TEST-MUTATED-TYPES
; caught 1 STYLE-WARNING condition
debugger invoked on a UNDEFINED-FUNCTION in thread
#<THREAD "main thread" RUNNING {10005184C3}>:
The function CL-TEST:
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [CONTINUE ] Retry calling TEST-MUTATED-TYPES.
1: [USE-VALUE ] Call specified function.
2: [RETURN-VALUE ] Return specified values.
3: [RETURN-NOTHING] Return zero values.
4: [ABORT ] Exit debugger, returning to top level.
("undefined function" 10000 10 :REPS 2)
0]
Paul F. Dietz (paul-f-dietz) wrote : | #7 |
Sorry, wrong name. test-random-
Christophe Rhodes (csr21-cantab) wrote : | #8 |
Thanks. Pushed a fix for this as 101e631a9202e32
Changed in sbcl: | |
status: | New → Fix Committed |
This bug was found by a property based tester of subtypep in ansi-test. To run this:
1) Get ansi-test from https:/ /github. com/pfdietz/ ansi-test
2) In the root directory of that checked out repo, start sbcl and load enough of the tests:
(load "run.lsp") types-aux. lsp") random- aux.lsp" ) random- types.lsp" )
(load "auxilliary/
(load "auxilliary/
(load "random/
3) In the package CL-TEST, execute test-mutated-types
(in-package :cl-test) mutated- types 10000 10 :reps 2)
(test-
If the result is nonempty, it will be a list of type pairs on which a property failed.
Simplify the pairs
(mapcar #'prune-type-pair *)
4) Additional testing can be done with test-types and test-type-triples. The latter has its own pruner, prune-type-triple.
5) If you run this long enough sbcl bogs down, probably because some internal cache of types has filled up. There should be some way of flushing this cache, or it should be flushed automatically when it gets too full.