Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

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

Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo
Status: Accepted
Owner: [hidden email]

New issue 3658 by [hidden email]: Dictionaries corrupt when loaded  
from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

Set and Dictionary were refactored and a common superclass HashedCollection  
introduced. All existing code that assumes that Dictionary is a subclass of  
Set must be fixed.

One such case that was overseen is in image segment where ... isKindOf: Set  
fails to capture dictionaries. This leads to potentially corrupted  
instances once dictionaries are loaded into the image through an image  
segment.

The attached changeset fixes this instance of the problem.

Attachments:
        FixImgSegHashedCollections.1.cs  2.1 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #1 on issue 3658 by [hidden email]: Dictionaries corrupt  
when loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

Adrian this is for 1.1.2, 1.2 and 1.3 ?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo
Updates:
        Labels: Milestone-1.1.2 Milestone-1.2 Milestone-1.3

Comment #2 on issue 3658 by [hidden email]: Dictionaries corrupt  
when loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

Yes. Its critical in each version for all uses of image segment. So I added  
tags for these three versions. If the patch can make into 1.2 and 1.1.2  
that would be good.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #3 on issue 3658 by [hidden email]: Dictionaries corrupt  
when loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

in 11420

TODO: 1.2 and 1.3


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #4 on issue 3658 by [hidden email]: Dictionaries corrupt  
when loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

in 1.2 12331


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo
Updates:
        Status: Closed

Comment #5 on issue 3658 by [hidden email]: Dictionaries corrupt  
when loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

in 13039


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #6 on issue 3658 by [hidden email]: Dictionaries corrupt when  
loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

(Set allCallsOn collect: [:t| t compiledMethod]) select: [:each | each  
hasLiteral: #isKindOf:]
reveals no further sites which should be affected by the refactoring.

Well, except for Set #=

s := Set with: 1 with: 2.
d := Dictionary with: 1->1 with: 2->2.

In 1.0:
s = d true
d = s false

in 1.1 onwards:
s = d true
d = s false

Noone's complained though :)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #7 on issue 3658 by [hidden email]: Dictionaries corrupt when  
loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

hups, copy paste error that was supposed to read:
s = d false
d = s false


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #8 on issue 3658 by [hidden email]: Dictionaries corrupt when  
loaded from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

... under "in 1.1 onwards:"

:)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3658 in pharo: Dictionaries corrupt when loaded from image segment

pharo

Comment #9 on issue 3658 by marianopeck: Dictionaries corrupt when loaded  
from image segment
http://code.google.com/p/pharo/issues/detail?id=3658

Hi Adrian. Good catch!!
Lastly I was trying to really understand why this rehash was necessary. I  
THINK I finally understood but Lukas never answered me.

http://article.gmane.org/gmane.comp.lang.smalltalk.pharo.devel/39386/match=sets+need+rehashed+loading+them

do you think I am correct ?

thanks