[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hash seed breaks 5.8.1 binary API; fix suggested



On Thu, Oct 09, 2003 at 10:41:34PM -0400, Chip Salzenberg wrote:
> I've found (with Walt Mankowski's help[*]) the probable explanation for
> why some modules -- most notably HTML::Parser -- break when Perl is
> upgraded from 5.8.0 to 5.8.1.  The hash seeding implementation has
> broken the binary API.  (Walt had the presence of mind to test with
> PERL_HASH_SEED=0 and found that it fixed the breakage.)

Gah. With hindsight I can see that I was going in the right direction for
your inference here:

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-06/msg00797.html

but I didn't realise there was further to go, and a miss is as good as a
mile.


On Thu, Oct 09, 2003 at 11:08:52PM -0700, Gisle Aas wrote:
> Chip Salzenberg <chip@pobox.com> writes:
> 
> > I suggest we fix this problem in 5.8.2 (which should be released
> > quickly) in the following fashion:

The maint tree is currently only 2 patches beyond 5.8.1. It's currently
at release quality. I have Monday off work, and was going to merge in
things from bleed. I may still do that, but now it seems we're thinking
of a release in the next two weeks, rather than the next 4 months

> > 
> >   1. Decree that PL_hash_seed should forever and ever be zero.
> >      This will make 5.8.0 and 5.8.1 PERL_HASH() calculate the same
> >      value at all times.
> > 
> >   2. Create a new variable PL_new_hash_seed which is initialized with
> >      the methods currently used for PL_hash_seed.
> > 
> >   3. Add (or xor or whatever) PL_new_hash_seed with the user-provided
> >      hash value *inside* the functions that use hashes, *not* outside
> >      them.
> > 
> > These changes should make 5.8.2 both source and binary compatible with
> > both 5.8.0. and 5.8.1.
> 
> Looks good.  I think we should do it.

We can't do this twice.

What would be really useful would be if people could test that all other
aspects of binary compatibility are preserved between 5.8.0 and 5.8.1
At some point in the future I was hoping to set up automatic smoke
testing of CPAN for this (build module with 5.8.n, check that it passes
all tests. If so, then run tests again with 5.8.(n+1). If all tests pass,
good. Else bug is assumed to be in 5.8.(n+1)

I won't have time to set such a thing up in the sort of timescale we need
here, so manual testing by anyone able to would be useful. Unfortunately
this is needed for 5.8.2 RCs

Nicholas Clark



Reply to: