nconc will be infiniteLoop when (nconc x x) , x is an non-nil list
Bug #1360773 reported by
enzo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
(setf x '(1))
(nconc x x) return 1 1 1 1 1 1 1 1 .......
(setf x nil)
(nconc x x) return nil
$ sbcl --version
SBCL 1.2.0
$ uname -a
Darwin Enzo's MBP 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-
$ uname -a
Linux vagrant-
tested in sbcl 1.1.14,1.2.0,1.2.2 ,both in my mac os x, and ubuntu
This is not a bug.
You made a circular list. To print it in limited time, set *print-circle* to T, or *print-length* to a number.
And modifying a literal object, such as a quoted list, is undefined. You should have used (setf x (list 1))