Re: Plan C (was Re: Plan B for fixing 5.8.2 binary API)
On Wed, Oct 15, 2003 at 01:49:21PM +0100, Alan Burlison wrote:
> Nicholas Clark wrote:
> >Plan C is to add a per hash flag to say if the flag is using a non-standard
> >hash function. This defaults to off (ie standard hash function).
> >So normally nothing extra happens (except for 1 extra flag check)
> >Any hash that is flagged as non-standard hashing throws away any passed in
> >pre-computed hash, and rehashes using the custom function. (which will be
> >the same for all custom hashes - the algorithm as of 5.8.1 with the random
> >seed). All this rehashing happens entirely in hv.o, so we have plan A
> >behaviour there.
> Umm... so what happens if something external has snagged the old hash
> value and the split/recalculate happens?
I was assuming that the only thing they can use the old hash value which
affects the internals of the hash is for is passing back into a hv function
as a pre-computed hash. And for a re-hashed hash the hv functions are
throwing away any passed in pre-computed values.
You can envisage a scenario where external routines are taking the hash
values and sniffing around the guts of a hash without using the hv