develooper Front page | perl.perl5.porters | Postings from October 2012

Re: Eliminating the "rehash" mechanism for 5.18

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
October 30, 2012 07:48
Subject:
Re: Eliminating the "rehash" mechanism for 5.18
Message ID:
20121030144812.GS1908@iabyn.com
On Tue, Oct 30, 2012 at 02:18:36PM +0100, demerphq wrote:
> On 30 October 2012 12:34, Dave Mitchell <davem@iabyn.com> wrote:
> > I'm not particularly keen on having hashes always randomised - it makes
> > debugging harder, and reproducing a reported issue nigh-on impossible;
> 
> But this is the case now. You have no idea if the rehash logic has
> fired off when you debug, nor in which hashes.
> 
> IMO, it will have the opposite effect, by making hash order dependency
> bugs much more obvious.

The rehash logic is intended to trigger very rarely. I was thinking of
debugging in terms of everything else *apart* from hashes; for example
it makes destruction order random between runs; so the first thing you
have to do (which I remember well from the 5.8.1 days) is do all debugging
with PERL_HASH_SEED set to zero; and when someone reports some weird
unpredictable destruction bug, it's hard to reproduce. This has to weighed
against, as you point out, the advantages it has of flushing out hash
order bugs.

-- 
This is a great day for France!
    -- Nixon at Charles De Gaulle's funeral

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About