develooper Front page | perl.perl5.porters | Postings from March 2013

Re: [perl #117239] Bleadperl v5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz

Thread Previous | Thread Next
March 21, 2013 09:25
Re: [perl #117239] Bleadperl v5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz
Message ID:
On 21 March 2013 10:15, Elizabeth Mattijsen <> wrote:
> On Mar 21, 2013, at 8:33 AM, Andreas Koenig <> wrote:
>> (Andreas J. Koenig) (via RT) <> writes:
>>> # <URL: >
>>>    Harden hashes against hash seed discovery by randomizing hash iteration
>> Other candidates that start failing around the same time and should get
>> a closer examination:
>> JEEN/Acme-CPANAuthors-Korean-0.09.tar.gz
>> SHARYANTO/Data-Schema-0.135.tar.gz
>> SMIRNIOS/DBD-SQLAnywhere-2.08.tar.gz
>> TIMB/DBI-1.623.tar.gz
>> ANDK/Devel-Symdump-2.08.tar.gz
>> OPI/IO-Handle-Record-0.14.tar.gz
>> MAKAMAKA/JSON-PPdev-2.27100.tar.gz
>> JEEN/Lingua-KO-TypoCorrector-0.03.tar.gz
>> JROBINSON/Locale-Object-0.79.tar.gz
>> PSCUST/Parse-FSM-1.06.tar.gz
>> MAGGIEXYZ/PDL-Stats-0.6.2.tar.gz
>> ADAMK/Perl-Squish-1.06.tar.gz
>> SATOH/Plack-Middleware-StaticShared-0.05.tar.gz
>> VOJ/RDF-NS-20130208.tar.gz
>> MWS/ResourcePool-1.0106.tar.gz
>> JSIRACUSA/Rose-HTML-Objects-0.617.tar.gz
>> MKUTTER/SOAP-Lite-0.714.tar.gz
>> MKUTTER/SOAP-Transport-TCP-0.715.tar.gz
>> TADAM/Test-Mock-LWP-Dispatch-0.03.tar.gz
>> MSCHWERN/Time-y2038-20100403.tar.gz
>> JEEN/WebService-Aladdin-0.0706.tar.gz
>> I have not had time to verify that they all start failing on the same
>> commit. At least for DBI I have evidence that it starts failing on
>> v5.17.9-201-g3078e10. But since randomness is involved this finding may
>> be biased.
>> I have not verified others due to lack of time.
> So, to get this straight:
> my @key=   keys %hash;
> my @value= values %hash;
> With this change, there is no guarantee anymore that $key[N] => $value[N] (in the same process) ?

Hi Liz! This hasn't changed.

> I'm not 100% sure, but FWIW I think I have used this property of keys() and values() in production code in the past.

Yep, you sure have, we all have I should think, at some point or another. :-)

And the behavior has not changed. Any code that is currently correct
will continue to work as before.

What has changed is that in earlier perls you could do something like this:

my @keys= keys %hash;
my %copy= %hash;
my @values= %copy;

and most of the time (but not always) get away with assuming that
$keys[$n] corresponds to $values[$n].

In 5.18 you are virtually guaranteed that $keys[$n] will NOT
correspond to $values[$n].

So all that has happened is that buggy code is now going to
demonstrate the bugs pretty much always instead of very very rarely.

ps: Hope you and Wendy are well!

perl -Mre=debug -e "/just|another|perl|hacker/"

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