Skip Menu |

This queue is for tickets about the Hash-MD5 CPAN distribution.

Report information
The Basics
Id: 106998
Status: resolved
Priority: 0/
Queue: Hash-MD5

People
Owner: Nobody in particular
Requestors: BOBMATH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.06
Fixed in: 0.07



Subject: hash values are the same; crash
Here are several examples where I don't think Hash::MD5 is working correctly. use strict; use warnings; use Hash::MD5 qw( sum_hash ); # keys are different, but hash is same print sum_hash({ a => '', aaaa => '', }), "\n"; # 6299dfa70679d91174c1d720693db234 print sum_hash({ aa => '', aaa => '', }), "\n"; # 6299dfa70679d91174c1d720693db234 # values are different, but hash is same print sum_hash({ a => 'a', aa => 'aaaaaaaaaaa', }), "\n"; # 526c242fdd5554fadaa5df7e28a49666 print sum_hash({ a => 'aaaaaaaaaaa', aa => 'a', }), "\n"; # 526c242fdd5554fadaa5df7e28a49666 # number of keys is different, but hash is same print sum_hash({ 'aaaaaaaaaaaaaaa"' => '', }), "\n"; # b1728471c8af05ae59afaa3ac8979b79 print sum_hash({ a => 'aa', aa => 'aaaaaaaaaa' }), "\n"; # b1728471c8af05ae59afaa3ac8979b79 # terminates with deep recursion error my %x; $x{a} = \%x; print sum_hash(\%x), "\n";
Subject: Re: [rt.cpan.org #106998] hash values are the same; crash
Date: Thu, 10 Sep 2015 06:38:06 +0200
To: bug-Hash-MD5 [...] rt.cpan.org
From: Mario Zieschang <mario_zieschang [...] web.de>
Thank you, I'm working on it. Am 10.09.2015 um 04:12 schrieb BOBMATH via RT: Show quoted text
> Wed Sep 09 22:12:10 2015: Request 106998 was acted upon. > Transaction: Ticket created by BOBMATH > Queue: Hash-MD5 > Subject: hash values are the same; crash > Broken in: 0.06 > Severity: Important > Owner: Nobody > Requestors: BOBMATH@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106998 > > > > Here are several examples where I don't think Hash::MD5 is working correctly. > > use strict; > use warnings; > use Hash::MD5 qw( sum_hash ); > > # keys are different, but hash is same > print sum_hash({ > a => '', > aaaa => '', > }), "\n"; > # 6299dfa70679d91174c1d720693db234 > print sum_hash({ > aa => '', > aaa => '', > }), "\n"; > # 6299dfa70679d91174c1d720693db234 > > # values are different, but hash is same > print sum_hash({ > a => 'a', > aa => 'aaaaaaaaaaa', > }), "\n"; > # 526c242fdd5554fadaa5df7e28a49666 > print sum_hash({ > a => 'aaaaaaaaaaa', > aa => 'a', > }), "\n"; > # 526c242fdd5554fadaa5df7e28a49666 > > # number of keys is different, but hash is same > print sum_hash({ > 'aaaaaaaaaaaaaaa"' => '', > }), "\n"; > # b1728471c8af05ae59afaa3ac8979b79 > print sum_hash({ > a => 'aa', > aa => 'aaaaaaaaaa' > }), "\n"; > # b1728471c8af05ae59afaa3ac8979b79 > > # terminates with deep recursion error > my %x; > $x{a} = \%x; > print sum_hash(\%x), "\n"; > >