This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initialize RMS structs at clone time in dl_vms.xs.
authorCraig A. Berry <craigberry@mac.com>
Sun, 1 Feb 2015 00:15:48 +0000 (18:15 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 1 Feb 2015 03:05:23 +0000 (21:05 -0600)
commit7bd4cafeb6e2e928c82c7a2151a09f2704cfbc09
treed1407343c41f11bd9c7e4220d467b93fd9455510
parent0bf519881fb841b70dd052211eeee7f0425e5168
Initialize RMS structs at clone time in dl_vms.xs.

When we clone the interpreter-specific data, we create new copies
of these structures under my_cxtp.  However, the copy contains
pointers that reference portions of the old structure, not the
copy.  Surprisingly, this usually works, but it does mean using
another thread's data and has recently turned into a test failure
via an access violation in dist/Thread-Queue/t/02_refs.t.

So let's copy a few lines from dl_private_init to the point at
which we clone, thus making sure those structures are initialized
once per thread.

It seems I really should have done this way back in 8c472fc1d477e.
ext/DynaLoader/DynaLoader_pm.PL
ext/DynaLoader/dl_vms.xs