In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7bd4cafeb6e2e928c82c7a2151a09f2704cfbc09?hp=0bf519881fb841b70dd052211eeee7f0425e5168>

- Log -----------------------------------------------------------------
commit 7bd4cafeb6e2e928c82c7a2151a09f2704cfbc09
Author: Craig A. Berry <[email protected]>
Date:   Sat Jan 31 18:15:48 2015 -0600

    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.
-----------------------------------------------------------------------

Summary of changes:
 ext/DynaLoader/DynaLoader_pm.PL | 2 +-
 ext/DynaLoader/dl_vms.xs        | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL
index c9800b7..c59dd5a 100644
--- a/ext/DynaLoader/DynaLoader_pm.PL
+++ b/ext/DynaLoader/DynaLoader_pm.PL
@@ -85,7 +85,7 @@ package DynaLoader;
 # [email protected], 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 bc9782c..576b08a 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.

--
Perl5 Master Repository

Reply via email to