[FIX] SequenceableCollection>>hash

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[FIX] SequenceableCollection>>hash

Andres Valloud-2
Hello VW...

  I just created this array to test my reference finder.

    array := Array new: 1.
    array at: 1 put: array

  The reference finder stores objects in an ObjectRegistry, so
  eventually that array is sent the message hash.

    array hash
   
  And because SequenceableCollection>>hash is not self-reference
  resistant, this results in an infinite loop and an out of memory VM
  crash.  Apparently, the VM is so efficient that the low space
  notification is not able to stop it from consuming all available
  memory.  Sigh :(...

  You will find the fix attached, including test cases.

--
Best regards,
 Andres                          mailto:[hidden email]

SelfReferentialHashFix.zip (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [FIX] SequenceableCollection>>hash

Andres Valloud-2
Hello Andres,

AV>   You will find the fix attached, including test cases.

Yes Andres, nice fix --- the hash of all arrays is now 0.

Back to the drawing board...

--
Best regards,
 Andres                            mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re[2]: [FIX] SequenceableCollection>>hash

Andres Valloud-2
Hello Andres,

Monday, September 4, 2006, 11:40:33 PM, you wrote:

AV> Yes Andres, nice fix --- the hash of all arrays is now 0.

Sigh... this one should be fine now.  Sorry for the mess :(.

--
Best regards,
 Andres                            mailto:[hidden email]

SelfReferentialHashFix-take2.zip (3K) Download Attachment