Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006456 [Squeak] Collections minor always 04-29-07 19:45 04-18-10 21:59
Reporter nicolas cellier View Status public  
Assigned To andreas
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version trunk Product Version 3.9
  Product Build
Summary 0006456: [BUG] Interval of Float do: infinite loop
Description A very simple example:

| x |
x := (1.0 timesTwoPower: 53).
(x to: x + 2) size.
x to: x+2 do: [:i | Transcript cr; show: i printString]
Steps To Reproduce
Additional Information do: should be defined with this arithmetic inside loop:
    value := start + (n * step)
that would be compatible both with size and at:
rather than:
    value := value + step

Same for reverseDo:
This is related to bugs 1602, 1603, 6438, 6455

If one will argue not to use Float, I answer in advance why don't you remove Float from the image?
Attached Files  Interval-InfiniteLoop-Test.1.cs [^] (802 bytes) 04-30-07 16:51
 Interval-InfiniteLoop-Patch.1.cs [^] (2,037 bytes) 04-30-07 16:52

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

related to 0001602closed KenCausey [ENH] Interval method indexOf: 
related to 0001603closed nicolas cellier [BUG][FIX] Interval method includes: 
related to 0006438closed KenCausey Interval>>reverseDo: is broken 
related to 0006455closed  [BUG] Interval includes: is weird 
related to 0007093closed nicolas cellier to:do: optimization is wrong when the block modifies the limit 
child of 0007002new  The Mother of all issues involving interval 

- Notes
(0010630 - 341 - 407 - 407 - 407 - 407 - 407)
wiz
04-29-07 22:16

another data point:

on my system ( iMac 400Hz running Os9.1 SqVM3.8.9b7 and 3.9 7067)


the above example does not infinitly loop. (It actual does not iterations inside the do.

(x - 2 to: x) do: [:i | Transcript cr; show: i printString]

on the other hand does loop infinitely.

Yours in curiosity and service, --Jerome Peace
 
(0010633 - 195 - 213 - 213 - 213 - 213 - 213)
nicolas cellier
04-30-07 16:55

Hi Jerome.
Very strange, i thought Squeak did strict IEEE 754 double precision and would execute bit-wise whatever the machine.

You can also increase intervak size (x to: x+4) or (x to: x+8).
 
(0010655 - 348 - 428 - 428 - 428 - 428 - 428)
nicolas cellier
05-03-07 23:40

As noted on vwnc list, another detail is that optimized to:do: loop still use the:
    value := value + step

So once the patch is loaded, you obtain a non null count with this one:

| eps count |
eps := 1.0 timesTwoPower: -52.
count := 0.
1 + eps to: 2 do: [:x | count := count + 1].
(1 + eps to: 2) do: [:x | count := count - 1].
^count
 
(0011731 - 169 - 223 - 223 - 223 - 223 - 223)
nicolas cellier
02-02-08 20:57

"fix begin"
Installer mantis bug: 6456 fix:'Interval-InfiniteLoop-Patch.1.cs'.
"fix test"
Installer mantis bug: 6456 fix:'Interval-InfiniteLoop-Test.1.cs'.
"fix end"
 
(0013447 - 127 - 139 - 469 - 469 - 469 - 469)
nicolas cellier
12-22-09 15:34

fixed in
http://source.squeak.org/trunk/Collections-nice.256.mcz [^]
http://source.squeak.org/trunk/CollectionsTests-nice.124.mcz [^]
 

- Issue History
Date Modified Username Field Change
04-29-07 19:45 nicolas cellier New Issue
04-29-07 22:16 wiz Note Added: 0010630
04-30-07 16:51 nicolas cellier File Added: Interval-InfiniteLoop-Test.1.cs
04-30-07 16:52 nicolas cellier File Added: Interval-InfiniteLoop-Patch.1.cs
04-30-07 16:55 nicolas cellier Note Added: 0010633
05-03-07 23:40 nicolas cellier Note Added: 0010655
02-02-08 20:57 nicolas cellier Note Added: 0011731
01-10-09 01:53 Keith_Hodges Status new => pending
01-10-09 02:27 Keith_Hodges Status pending => testing
01-10-09 03:39 Keith_Hodges Status testing => resolved
01-10-09 03:39 Keith_Hodges Fixed in Version  => 3.11
01-10-09 03:39 Keith_Hodges Resolution open => fixed
01-10-09 03:39 Keith_Hodges Assigned To  => Keith_Hodges
01-10-09 03:41 Keith_Hodges Status resolved => testing
10-03-09 19:34 Keith_Hodges Status testing => assigned
10-03-09 19:34 Keith_Hodges Assigned To Keith_Hodges => andreas
10-03-09 20:28 nicolas cellier Relationship added related to 0001602
10-03-09 20:28 nicolas cellier Relationship added related to 0001603
10-03-09 20:29 nicolas cellier Relationship added related to 0006438
10-03-09 20:29 nicolas cellier Relationship added related to 0006455
12-22-09 15:34 nicolas cellier Status assigned => resolved
12-22-09 15:34 nicolas cellier Fixed in Version 3.11 => trunk
12-22-09 15:34 nicolas cellier Note Added: 0013447
04-18-10 21:59 andreas Status resolved => closed
08-21-10 13:09 nicolas cellier Relationship added child of 0007002
02-03-11 23:27 nicolas cellier Relationship added related to 0007093


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
92 total queries executed.
54 unique queries executed.
Powered by Mantis Bugtracker