Front page | perl.perl5.porters |
Postings from July 2020
July 29, 2020 10:30
Message ID: 202007290948.06T9m1P23385@crypt.org
demerphq <firstname.lastname@example.org> wrote:
:On Wed, 29 Jul 2020 at 00:00, <email@example.com> wrote:
:> demerphq <firstname.lastname@example.org> wrote:
:> :Can you tell me what PERL_HASH_SEED_DEBUG=1 reports for you?
:> :I have a feeling your perl is built with hadh seed randomization disabled.
:> % PERL_HASH_SEED_DEBUG=1 /opt/v5.32.0-d/bin/perl -e 1
:> HASH_FUNCTION = SBOX32_WITH_STADTX HASH_SEED = 0x986401ef56ab149158c74ee4062846bd8b8504d92918d2beaf137d90 PERTURB_KEYS = 1 (RANDOM)
:Ok, I get it now. Your perl is /opt/v5.32.0-d/bin/perl. But your
:script references the system perl in your $PATH.
Ah no, the script I used referenced the same perl explicitly; I reduced
that to 'perl' to share it in the email.
Just to confirm I ran it using $^X instead, and again got 30 copies of
'fmpdvjxiezlghkrotnyasuqwbc'. I get the same result (30 copies of some
string, not necessarily the same one) with several other locally installed
% PERL_HASH_SEED_DEBUG=1 /opt/v5.28.1/bin/perl -e 1
HASH_FUNCTION = SBOX32_WITH_STATDX HASH_SEED = 0x5afc389d7cd92b2d24cf55677e77eabe7f13d65bea502c5734b45a5b PERTURB_KEYS = 1 (RANDOM)
% PERL_HASH_SEED_DEBUG=1 /opt/v5.30.0-d/bin/perl -e 1
HASH_FUNCTION = SBOX32_WITH_STADTX HASH_SEED = 0x8f9a8d9d90e3a4c7e2c7aee1296da214c6a69686f38126244ab41750 PERTURB_KEYS = 1 (RANDOM)
% PERL_HASH_SEED_DEBUG=1 /opt/v5.31.10-d/bin/perl -e 1
HASH_FUNCTION = SBOX32_WITH_STADTX HASH_SEED = 0x3f531474e73fd3e0e083390f9893801ef1072cf2a5512da51961da41 PERTURB_KEYS = 1 (RANDOM)
% PERL_HASH_SEED_DEBUG=1 /opt/v5.32.0-d/bin/perl -e 1
HASH_FUNCTION = SBOX32_WITH_STADTX HASH_SEED = 0x252cfa4768d343caaa2ea7a313eab33b4f8bab52e7b4993d44fd0bf1 PERTURB_KEYS = 1 (RANDOM)
System perl is 5.26.1 with 67 registered patches (Ubuntu 18.04.4), and
that gives 10 triples similar to your output:
% PERL_HASH_SEED_DEBUG=1 perl -e 1
HASH_FUNCTION = HYBRID_OAATHU_SIPHASH_1_3 HASH_SEED = 0x645353b08bcb9b82a48ecf87816cffb48a58faeaa1c191c8 PERTURB_KEYS = 1 (RANDOM)
This all feels like a distraction though: it all focuses on some
unexpectedly deterministic results, when the bit I was asking about
related to the unexpectedly _non-deterministic_ results.