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

Re: Eliminating the "rehash" mechanism for 5.18

Thread Previous | Thread Next
Peter Rabbitson
October 30, 2012 08:08
Re: Eliminating the "rehash" mechanism for 5.18
Message ID:
On Tue, Oct 30, 2012 at 02:48:12PM +0000, Dave Mitchell wrote:
> On Tue, Oct 30, 2012 at 02:18:36PM +0100, demerphq wrote:
> > On 30 October 2012 12:34, Dave Mitchell <> 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.

Offering a counter-point to this - DBIx::Class does some very very deep 
and weird magic with object destruction (local and global). I have never 
had a failure on 5.8.1 related to that.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About