diff options
author | Tony Cook <tony@develop-help.com> | 2016-05-18 15:03:14 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2017-09-11 10:59:42 +1000 |
commit | f26b33bdaa1e41fbaf65c649a3208f081fa7571b (patch) | |
tree | 08ebd8b38bf725af3bd0a77465a1916229812aaf /intrpvar.h | |
parent | 3ff4feb5bd226622062600b4127bb8c276c9d5ec (diff) | |
download | perl-f26b33bdaa1e41fbaf65c649a3208f081fa7571b.tar.gz |
(perl #127663) create a separate random source for internal use
and use it to initialize hash randomization and to innoculate against
quadratic behaviour in pp_sort
Diffstat (limited to 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h index b6b20bcad9..766e552aed 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -830,6 +830,14 @@ PERLVAR(I, random_state, PL_RANDOM_STATE_TYPE) PERLVARI(I, dump_re_max_len, STRLEN, 0) +/* For internal uses of randomness, this ensures the sequence of + * random numbers returned by rand() isn't modified by perl's internal + * use of randomness. + * This is important if the user has called srand() with a seed. + */ + +PERLVAR(I, internal_random_state, PL_RANDOM_STATE_TYPE) + /* If you are adding a U8 or U16, check to see if there are 'Space' comments * above on where there are gaps which currently will be structure padding. */ |