nconc will be infiniteLoop when (nconc x x) , x is an non-nil list

Bug #1360773 reported by enzo
6
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-2422.110.17~1/RELEASE_X86_64 x86_64

$ uname -a
Linux vagrant-ubuntu-saucy-64 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

tested in sbcl 1.1.14,1.2.0,1.2.2 ,both in my mac os x, and ubuntu

enzo (liu-enze)
description: updated
Revision history for this message
Orivej Desh (orivej) wrote :

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))

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Invalid
Revision history for this message
enzo (liu-enze) wrote :

OK,my fault, thanks for letting me know.

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.