develooper Front page | perl.perl5.porters | Postings from September 2003

Re: How to detect hash randomization?

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
September 8, 2003 04:59
Subject:
Re: How to detect hash randomization?
Message ID:
Pine.LNX.4.44.0309080756320.23335-100000@redcap.sidhe.org
On Mon, 8 Sep 2003, Elizabeth Mattijsen wrote:

> At 07:25 -0400 9/8/03, Dan Sugalski wrote:
> >On Mon, 8 Sep 2003, Rafael Garcia-Suarez wrote:
> >
> >>  Elizabeth Mattijsen wrote:
> >>  > If I build 21021 with:
> >>  >
> >>  >    -Accflags=-DNO_HASH_SEED
> >>  >
> >>  > I correctly get a Perl 5.8.1 with the same has keys order as 5.8.0,
> >>  > and which does _not_ listen to the environment variable
> >>  > PERL_HASH_SEED, but perl -V doesn't say that it has been built with
> >>  > -DNO_HASH_SEED.  Is this intentional, an oversight or a side-effect
> >>  > of having to use -Accflags?
> >>
> >>  You can always do 'perl -V:ccflags'. That should be there.
> >
> >Why not just fix up Config.pm and the build a bit to add a new key to the
> >configure hash? $Config{has_hash_seed} or something like that, which'll
> >mean you don't have to parse the (potentially platform-dependent) C flags.
> 
> Hmmm... there is also a run-time component to this check, namely 
> whether or not PERL_HASH_SEED is set or not.  So that would imply 
> some more magic in the tied %Config hash...  ;-(

Not necessarily. %Config is for compile-time stuff, so it really ought not 
be in there. Besides, adding in tied components to it is somewhat 
problematic.

I'd suggest adding in a %^C hash with runtime config settings, but Jarkko 
knows where I live... :)

					Dan


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