Closed pheix closed 1 year ago
It crashes on latest version as well:
Indeed it does on my machine too. Not sure why the tests don't crash.
PS. Very weirdly, it works fine when adding an alphabetic prefix:
$ raku -MDigest::MD5 -e "md5('x158.389').say";
Blob:0x<4C 99 79 A4 E8 CE 77 81 A1 99 A3 65 E4 03 C2 98>
:crying_cat_face:
[kostas@webtech-omen utils]$ raku -MDigest::MD5 -e "md5('158.389x').say";
Blob:0x<6E 80 44 F2 2A 16 E8 1D AC 6C 76 4C A5 B4 81 59>
[kostas@webtech-omen utils]$ raku -MDigest::MD5 -e "md5('158x389').say";
Blob:0x<77 13 9D 7E D3 0D AD 17 3C 12 72 64 E3 3A 8E 59>
[kostas@webtech-omen utils]$ raku -MDigest::MD5 -e "md5('158,389').say";
Blob:0x<AE 65 F5 3E 1B 3B 9E B6 B8 69 08 CE 85 FC A9 DE>
[kostas@webtech-omen utils]$ raku -MDigest::MD5 -e "md5('158.389').say";
Cannot unbox negative bigint into native unsigned integer
in block at /opt/rakudo/rakudo-star-2022.04/share/perl6/site/sources/09B6112E2626A59F08A91D5D4762CC9F145C0515 (Digest::MD5) line 15
in sub md5 at /opt/rakudo/rakudo-star-2022.04/share/perl6/site/sources/09B6112E2626A59F08A91D5D4762CC9F145C0515 (Digest::MD5) line 10
in sub md5 at /opt/rakudo/rakudo-star-2022.04/share/perl6/site/sources/09B6112E2626A59F08A91D5D4762CC9F145C0515 (Digest::MD5) line 4
in block <unit> at -e line 1
I'll just add a mod 2**32 operation at the necessary step
:rocket: update, let me check on my test base...
UPD: Perfect:
[kostas@webtech-omen utils]$ zef install https://github.com/grondilu/libdigest-raku.git
===> Testing: Digest:ver<0.24.0>
===> Testing [OK] for Digest:ver<0.24.0>
===> Installing: Digest:ver<0.24.0>
[kostas@webtech-omen core-perl6]$ time raku -MDigest::MD5 -e "for (1..1000000) { md5((0..10000).rand.Str) }";
real 21m59.710s
user 21m53.113s
sys 0m1.368s
Looks like smth was broken with https://github.com/grondilu/libdigest-raku/commit/289a042ec2e7e556dc73780b58ed99362055de77:
Looks relevant to #27 and #28.
It crashes on latest version as well: