diff options
author | David Mitchell <davem@iabyn.com> | 2014-02-28 14:37:13 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2014-02-28 14:37:13 +0000 |
commit | 186460900eddc03b1e140296f25d2a6bf5fb9ec9 (patch) | |
tree | 6b89794fa7fe3ad9e1566046946492480e86795e | |
parent | 111f73b5d79a652d1b6c6e3df3c6cd4c14c17ea7 (diff) | |
download | perl-186460900eddc03b1e140296f25d2a6bf5fb9ec9.tar.gz |
copy xhv_rand and xhv_last_rand in threads clone
valgrind complains about these fields being uninitialised when cloned into a
new thread, because they aren't copied. It's fairly harmless, since these
fields are just used to perturb hash key iteration; but for completeness,
clone these fields too.
-rw-r--r-- | sv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -12616,6 +12616,10 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) daux->xhv_fill_lazy = saux->xhv_fill_lazy; daux->xhv_aux_flags = saux->xhv_aux_flags; +#ifdef PERL_HASH_RANDOMIZE_KEYS + daux->xhv_rand = saux->xhv_rand; + daux->xhv_last_rand = saux->xhv_last_rand; +#endif daux->xhv_riter = saux->xhv_riter; daux->xhv_eiter = saux->xhv_eiter ? he_dup(saux->xhv_eiter, |