summaryrefslogtreecommitdiff
path: root/ext/DynaLoader
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2015-01-31 18:15:48 -0600
committerCraig A. Berry <craigberry@mac.com>2015-01-31 21:05:23 -0600
commit7bd4cafeb6e2e928c82c7a2151a09f2704cfbc09 (patch)
treed1407343c41f11bd9c7e4220d467b93fd9455510 /ext/DynaLoader
parent0bf519881fb841b70dd052211eeee7f0425e5168 (diff)
downloadperl-7bd4cafeb6e2e928c82c7a2151a09f2704cfbc09.tar.gz
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.
Diffstat (limited to 'ext/DynaLoader')
-rw-r--r--ext/DynaLoader/DynaLoader_pm.PL2
-rw-r--r--ext/DynaLoader/dl_vms.xs9
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index c9800b7fc7..c59dd5a57c 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -85,7 +85,7 @@ package DynaLoader;
# Tim.Bunce@ig.co.uk, August 1994
BEGIN {
- $VERSION = '1.30';
+ $VERSION = '1.31';
}
use Config;
diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs
index bc9782cced..576b08a9f8 100644
--- a/ext/DynaLoader/dl_vms.xs
+++ b/ext/DynaLoader/dl_vms.xs
@@ -371,6 +371,15 @@ CLONE(...)
MY_CXT.x_dl_last_error = newSVpvs("");
dl_require_symbols = get_av("DynaLoader::dl_require_symbols", GV_ADDMULTI);
+ /* Set up the "static" control blocks for dl_expand_filespec() */
+ dl_fab = cc$rms_fab;
+ dl_nam = cc$rms_nam;
+ dl_fab.fab$l_nam = &dl_nam;
+ dl_nam.nam$l_esa = dl_esa;
+ dl_nam.nam$b_ess = sizeof dl_esa;
+ dl_nam.nam$l_rsa = dl_rsa;
+ dl_nam.nam$b_rss = sizeof dl_rsa;
+
#endif
# end.