[WARNING!]SqueakMap problems
Brian Keefer
mgomes21 at cox.net
Wed Nov 20 03:25:04 UTC 2002
John M McIntosh wrote:
>
> Well if you are running using the Smalltalk code that generates the
> UUID this might be true,
> and I'm not sure that people remove chunks of code from the image just
> for fun,
> or isn't there support in the windows vm for the UUID primitive?
>
> Anyway the smalltalk generated code inserts bits of 'random' by doing
>
> setupRandom
> | seed |
> randomCounter _ 0.
> [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self
> hash.
> seed = 0] whileTrue: ["Try again if ever get a seed = 0"].
> randomGenerator _ Random seed: seed.
>
> which then gets saved via stuffing an instance of the UUIDGenerator
> into a class variable . That instance
> is used to generate the UUID
>
> I'll note in the croquet image this class variable is nil, thus a UUID
> call creates a new instance and a new instance of Random.
>
> So I'm kinda confused since Random does it not preserve Entropy over
> image saves?
>
> Well unless you fail to save the image, then gee you get the problem,
> because the instance of Random will just restart
> from the entropy it remembers from the last save. Thus crashing the
> image without saving will cause a repeat.
On startup, the image can discover that its changes file lacks the save
checkpoint, and nil out the entropy data.
More information about the Squeak-dev
mailing list
|