Front page | perl.perl5.porters |
Postings from November 2003
Re: 5.8.2-RC1 and mp2
From: Stas Bekman
November 2, 2003 11:44
Re: 5.8.2-RC1 and mp2
Message ID: 3FA55E98.email@example.com
Jan Dubois wrote:
> On Sun, 02 Nov 2003 10:56:07 -0800, Stas Bekman <firstname.lastname@example.org> wrote:
>>Jan Dubois wrote:
>>>On Sun, 02 Nov 2003 01:00:03 -0800, Stas Bekman <email@example.com> wrote:
>>>>Why do we need two variables? If PL_hash_seed is there only for binary
>>>>compatibility, why not have the two point to the same thing? I've
>>>>s/PL_hash_seed/PL_new_hash_seed/ in hv.[ch] and I've got everything working as
>>>The reason for keeping PL_hash_seed permanently set to 0 is to maintain
>>>binary compatibility with 5.8.1. Modules compiled with the 5.8.1. version
>>>of hv.h are using it in their PERL_HASH expansion *before* the new
>>>rehashing scheme kicks in.
>>It wasn't 0, but 0 or PL_hash_seed in 5.8.1, dependinig on the compilation
>>flags. mod_perl 2.0 sets PL_hash_seed for 5.8.1. At the moment (21616)
>>PL_hash_seed ignores env var PERL_HASH_SEED.
> Which is exactly how it should be: PL_hash_seed is 0, so modules compiled
> with 5.8.0, 5.8.1 and 5.8.2 will *all* use the same hashing function in XS
> code _when_ running under 5.8.2. Which is what binary compatibility is
Understood. What happens if 5.8.2 uses a module built with 5.8.0 and a 5.8.2's
rehashing kicks in? Now PERL_HASH() and PERL_HASH_INTERNAL() are in
disagreement and that module may fail again, no?
> I understand that those modules compiled with 5.8.1 or 5.8.2 will use a
> different hashing function than modules compiled under 5.8.0 _when_
> running under 5.8.1. This is why 5.8.1 is not binary compatible.
> PS: Of course, if Perl 5.8.1 has been explicitly configured with
> -DPERL_HASH_SEED=123456, then there still won't be binary compatibility.
> But I doubt anybody actually did that (using a fixed, built-in
Similarly if someone was depending on a flexible run-time setting of the seed,
they will have exactly the same problem. So if you did:
% env PERL_HASH_SEED=123456 myprogram
to reproduce some problem, it no longer will be reproducable with 5.8.2,
because PERL_HASH_SEED is ignored most of the time and used only on rehashing.
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:firstname.lastname@example.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com