Mantis - Squeak
Viewing Issue Advanced Details
7607 VM crash always 02-22-11 20:43 03-03-11 07:26
leves  
eem  
normal  
assigned  
open  
none    
none  
0007607: CogVM creates corrupted Floats with #adoptInstance:
The following crashes r2361 on windows with "Out of memory":

w := #(1 2) asWordArray.
Float adoptInstance: w.
0.0 - w

Alt+. doesn't interrupt the process. crash.dmp contains the following:

Smalltalk stack dump:
  0x97e0ac M Float(Number)>adaptToFloat:andSend: 295872364: a(n) Float
  0x97e0cc M Float>- 295872364: a(n) Float
  0x983710 M Float(Number)>adaptToFloat:andSend: 295872364: a(n) Float
  0x983730 M Float>- 295872364: a(n) Float
  ... (this repeats several times)
This is not a bug in the image, because the following works as expected:

f := Float new: 2.
f
    at: 1 put: 1;
    at: 2 put: 2.
0.0 - f

So the Float object created by #adoptInstance: is corrupted somehow. The following also works:

w := #(1 2) asWordArray.
Float adoptInstance: w.
w class. "Float"
w size. "2"
w at: 1. "2"
w at: 2. "1"

Also note that SqueakVM is not affected by this.

Notes
(0014056)
leves   
03-03-11 07:26   
Forgot to assign it to Eliot, sorry.