summaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-08-06 22:48:04 +0200
committerYves Orton <demerphq@gmail.com>2022-08-09 14:08:10 +0200
commit86d84dd06fe16998648c41a393a25a59b9c470b7 (patch)
treec21c3218ada6a4611f63ebcac03b568d337d96c7 /INSTALL
parent58411bc7381d696a6aa53ea5106866fc975fe9ae (diff)
downloadperl-86d84dd06fe16998648c41a393a25a59b9c470b7.tar.gz
perl.c - remove code for reporting state of non-existent defines in -V
Most of the hash based defines are no longer supported, so remove them. Also at the same time introduce a new simpler way to track which hash function we are using. Also add the info about if SBOX32 is in use. This removes the need to keep the list of hash functions supported in two places, hv_func.h and perl.c. Instead hv_func.h drives the whole process and perl.c just does what it is told. Previously the way to control SBOX32 was to use a define with a value but our perl -V output currently doesnt support that, so this adds some two new defines PERL_HASH_USE_SBOX32 and PERL_HASH_NO_SBOX32 which map to the older PERL_HASH_USE_SBOX32_ALSO flag define (integer 1/0). Both are still supported, this just makes everything more consistent. This also includes minor doc changes to INSTALL to mention -Accflags as being the way to set these defines during the Configure process.
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL35
1 files changed, 22 insertions, 13 deletions
diff --git a/INSTALL b/INSTALL
index d405db7a78..a06b27ad98 100644
--- a/INSTALL
+++ b/INSTALL
@@ -450,30 +450,39 @@ storage with 256 32-bit random values as well. In practice the RNG we use
for seeding the SBOX32 storage is very efficient, and populating the table
required for hashing even fairly long keys is negligible as we only do it
during startup. By default we build with SBOX32 enabled, but you can change
-that by setting
+that by setting the C<PERL_HASH_USE_SBOX32_ALSO> in the Configure process,
+with something like this
- PERL_HASH_USE_SBOX32_ALSO
+ -Accflags='-DPERL_HASH_USE_SBOX32_ALSO=0'
-to zero in configure. By default Perl will use SBOX32 to hash strings 24 bytes
-or shorter, you can change this length by setting
+or alternatively you can use the simple define C<PERL_HASH_NO_SBOX32> like this:
- SBOX32_MAX_LEN
+ -Accflags='-DPERL_HASH_NO_SBOX32'
-to the desired length, with the maximum length being 256.
+By default Perl will use SBOX32 to hash strings 24 bytes
+or shorter, you can change this length by setting C<SBOX32_MAX_LEN>
+to the desired length, with the maximum length being 256. For example with
+this:
+
+ -Accflags='-DSBOX_MAX_LEN=128'
As of Perl 5.18 the order returned by keys(), values(), and each() is
non-deterministic and distinct per hash, and the insert order for
colliding keys is randomized as well, and perl allows for controlling this
by the PERL_PERTURB_KEYS environment setting. You can disable this behavior
-entirely with the define
+entirely with the define C<PERL_PERTURB_KEYS_DISABLED> with
- PERL_PERTURB_KEYS_DISABLED
+ -Accflags='-DPERL_PERTURB_KEYS_DISABLED'
You can disable the environment variable checks and compile time specify
-the type of key traversal randomization to be used by defining one of these:
+the type of key traversal randomization to be used by defining either
+C<PERL_PERTURB_KEYS_RANDOM> or C<PERL_PERTURB_KEYS_DETERMINISTIC> with
+
+ -Accflags='-DPERL_PERTURB_KEYS_RANDOM'
+
+or
- PERL_PERTURB_KEYS_RANDOM
- PERL_PERTURB_KEYS_DETERMINISTIC
+ -Accflags='-DPERL_PERTURB_KEYS_DETERMINISTIC'
Since Perl 5.18 the seed used for the hash function is randomly selected
at process start, which can be overridden by specifying a seed by setting
@@ -489,9 +498,9 @@ DETERMINISTIC in this context means "if everything else is kept the same
the same results should be observed".
You can change this behavior so that your perl is built with a hard coded
-seed with the define
+seed with the define C<NO_HASH_SEED> by providing to Configure
- NO_HASH_SEED
+ -Accflags='-DNO_HASH_SEED'
Note that if you do this you should modify the code in hv_func.h to specify
your own key. In the future this define may be renamed and replaced with one