Mantis - Squeak
Viewing Issue Advanced Details
6475 Kernel minor always 05-08-07 22:58 11-20-08 20:54
mathk  
 
normal  
closed 3.10  
fixed  
none    
none 3.10  
0006475: BlockClosure comparaison goes to an infinit loop when closure inline himself
Taking this exemple:

A>>#foo
   i := 21. j := 0.
   b := [(i:= i-1) > 0 ifTrue: [j := j+1 . b value.] ifFalse:[j]] .
   b value

Use the NewCompiler and do: (A>>#foo) = (A>>#foo)

The attached patch fix the problem.

Thanks to Andrew to have discover the bug.
Edgar if you pass by don't worry I will add the test but now I need to go to sleep
 FixComparingClosure.1.cs [^] (338 bytes) 05-08-07 22:58
 FixComparingClosure.2.cs [^] (1,491 bytes) 05-09-07 10:50
 FixComparingClosure.3.cs [^] (2,717 bytes) 05-10-07 09:32

Notes
(0010687)
mathk   
05-09-07 10:48   
Attached file now have some test
(0010688)
mathk   
05-10-07 09:34   
Same bug for BlockClosure>>#hasLiteralThorough:

aBlockClosure hasLiteralThorough: #example

gose to an infinit loop

Attached file fix it
(0010898)
edgardec   
07-19-07 20:21   
Reminder sent to: mathk

Is safe I do one update ? Or yo wish work ont this some more ?
(0010906)
mathk   
07-20-07 15:54   
Yes is should be safe.

It also fix some refactoring

(0010908)
edgardec   
07-21-07 10:03   
This now is 7129FixComparingClosure-3.cs and was in updates for 3.10
Thanks !
(0010964)
mathk   
08-08-07 09:56   
Hi my fix have one bugs.

I open a new issue http://bugs.squeak.org/view.php?id=6599 [^]
(0012793)
KenCausey   
11-20-08 20:54   
Harvested in update 7129 and released with Squeak 3.10.