diff options
author | David Mitchell <davem@iabyn.com> | 2014-02-28 14:37:13 +0000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-04-16 12:59:03 +1000 |
commit | 2396ba2d2ddfdc5fe8efc8a43ccb57f5edd6b068 (patch) | |
tree | 950b5f0537aef32dbfb97790f8e8c3487d7edd39 /sv.c | |
parent | b380e583f8ebe423cffa9f4986cf213064b3eb59 (diff) | |
download | perl-2396ba2d2ddfdc5fe8efc8a43ccb57f5edd6b068.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.
Conflicts:
sv.c
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -12356,6 +12356,10 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) } daux->xhv_name_count = saux->xhv_name_count; +#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, |