stevedekorte/io — Issue #178: Infinite recursion in slotSummary / asString if a list() has a reference to higher object
Author: dennisferron
Created: 2011-12-31 08:01:06+00:00
State: open

Hitting an object containing the value "list(self)" causes an infinite recursion in slotSummary (and therefore asString, writeln and the REPL). Perhaps related to issue #36?

This surprisingly short line will hose the REPL:
Io> list(Lobby)

Or try this in a script file or in the REPL:

Io> a := Object clone do( init := method( newSlot("die", list() append(self) ) )
... )
==> Object_0x232ab70:
init = method(...)

Io> writeln(a clone)
^C
IOVM:
Received signal. Setting interrupt flag.

current coroutine
---------
Coroutine callStack A4_Exception.io 244
Coroutine backTraceString A4_Exception.io 274
Coroutine showStack System.io 62
System userInterruptHandler [unlabeled] 0
List join A3_List.io 276
Sequence .. A3_List.io 276
List asString A3_List.io 278
List asSimpleString [unlabeled] 0
List mapInPlace [unlabeled] 0
List map A2_Object.io 271
Call relayStopStatus A4_Exception.io 24
Call delegateToMethod A0_List.io 176
Object slotDescriptionMap A2_Object.io 311
Object asString [unlabeled] 0
List join A3_List.io 276
Sequence .. A3_List.io 276
List asString A3_List.io 278
List asSimpleString [unlabeled] 0

Press enter...