Change 34256 by [EMAIL PROTECTED] on 2008/09/03 21:17:47

        Integrate:
        [ 34046]
        For dynamic loading on VMS, simplify and robustify things by using
        the system-supplied exception handler rather than the home-rolled one.
        This eliminates an access violation sometimes seen with heavy loading
        under threads.
        
        [ 34163]
        Subject: [perl #56766] [PATCH]
        From: Vincent Pit <[EMAIL PROTECTED]>
        Date: Thu, 10 Jul 2008 18:10:10 +0200
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 34165]
        Subject: [PATCH] Version bump for Data::Dumper
        From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
        Date: Wed, 30 Jul 2008 12:54:34 -0400
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.10/perl/ext/Data/Dumper/Dumper.pm#2 integrate
... //depot/maint-5.10/perl/ext/Data/Dumper/t/bugs.t#2 integrate
... //depot/maint-5.10/perl/ext/DynaLoader/dl_vms.xs#2 integrate

Differences ...

==== //depot/maint-5.10/perl/ext/Data/Dumper/Dumper.pm#2 (text) ====
Index: perl/ext/Data/Dumper/Dumper.pm
--- perl/ext/Data/Dumper/Dumper.pm#1~32694~     2007-12-22 01:23:09.000000000 
-0800
+++ perl/ext/Data/Dumper/Dumper.pm      2008-09-03 14:17:47.000000000 -0700
@@ -9,7 +9,7 @@
 
 package Data::Dumper;
 
-$VERSION = '2.121_14';
+$VERSION = '2.121_17';
 
 #$| = 1;
 
@@ -65,7 +65,7 @@
 
   croak "Usage:  PACKAGE->new(ARRAYREF, [ARRAYREF])" 
     unless (defined($v) && (ref($v) eq 'ARRAY'));
-  $n = [] unless (defined($n) && (ref($v) eq 'ARRAY'));
+  $n = [] unless (defined($n) && (ref($n) eq 'ARRAY'));
 
   my($s) = { 
              level      => 0,           # current recursive depth

==== //depot/maint-5.10/perl/ext/Data/Dumper/t/bugs.t#2 (text) ====
Index: perl/ext/Data/Dumper/t/bugs.t
--- perl/ext/Data/Dumper/t/bugs.t#1~32694~      2007-12-22 01:23:09.000000000 
-0800
+++ perl/ext/Data/Dumper/t/bugs.t       2008-09-03 14:17:47.000000000 -0700
@@ -16,7 +16,7 @@
 }
 
 use strict;
-use Test::More tests => 3;
+use Test::More tests => 4;
 use Data::Dumper;
 
 {
@@ -59,3 +59,14 @@
     eval $txt;
     is_deeply($VAR1, \%h, '[perl #40668] Reset hash iterator');
 }
+
+# [perl #56766] Segfaults on bad syntax - fixed with version 2.121_17
+sub doh
+{
+    # 2nd arg is supposed to be an arrayref
+    my $doh = Data::Dumper->Dump([EMAIL PROTECTED],'@_');
+}
+doh('fixed');
+ok(1, "[perl #56766]"); # Still no core dump? We are fine.
+
+# EOF

==== //depot/maint-5.10/perl/ext/DynaLoader/dl_vms.xs#2 (text) ====
Index: perl/ext/DynaLoader/dl_vms.xs
--- perl/ext/DynaLoader/dl_vms.xs#1~32694~      2007-12-22 01:23:09.000000000 
-0800
+++ perl/ext/DynaLoader/dl_vms.xs       2008-09-03 14:17:47.000000000 -0700
@@ -49,11 +49,6 @@
 #include "perl.h"
 #include "XSUB.h"
 
-/* N.B.:
- * dl_debug and dl_last_error are static vars; you'll need to deal
- * with them appropriately if you need context independence
- */
-
 #include <descrip.h>
 #include <fscndef.h>
 #include <lib$routines.h>
@@ -119,6 +114,7 @@
       strncat(dl_last_error, msg->dsc$a_pointer, msg->dsc$w_length);
       dl_last_error[errlen+msg->dsc$w_length+1] = '\0';
     }
+    DLDEBUG(2,PerlIO_printf(Perl_debug_log, "Saved error message: %s\n", 
dl_last_error));
     return 0;
 }
 
@@ -136,19 +132,6 @@
     _ckvmssts(sys$putmsg(vec,copy_errmsg,0,0));
 }
 
-static unsigned int
-findsym_handler(void *sig, void *mech)
-{
-    dTHX;
-    unsigned long int myvec[8],args, *usig = (unsigned long int *) sig;
-    /* Be paranoid and assume signal vector passed in might be readonly */
-    myvec[0] = args = usig[0] > 10 ? 9 : usig[0] - 1;
-    while (--args) myvec[args] = usig[args];
-    _ckvmssts(sys$putmsg(myvec,copy_errmsg,0,0));
-    DLDEBUG(2,PerlIO_printf(Perl_debug_log, "findsym_handler: 
received\n\t%s\n",dl_last_error));
-    return SS$_CONTINUE;
-}
-
 /* wrapper for lib$find_image_symbol, so signalled errors can be saved
  * for dl_error and then returned */
 static unsigned long int
@@ -158,7 +141,7 @@
                      struct dsc$descriptor_s *defspec)
 {
   unsigned long int retsts;
-  VAXC$ESTABLISH(findsym_handler);
+  VAXC$ESTABLISH(lib$sig_to_ret);
   retsts = 
lib$find_image_symbol(imgname,symname,entry,defspec,DL_CASE_SENSITIVE);
   return retsts;
 }
@@ -350,7 +333,7 @@
     DLDEBUG(2,PerlIO_printf(Perl_debug_log, "\tentry point is %d\n",
                       (unsigned long int) entry));
     if (!(sts & 1)) {
-      /* error message already saved by findsym_handler */
+      dl_set_error(sts,0);
       ST(0) = &PL_sv_undef;
     }
     else ST(0) = sv_2mortal(newSViv(PTR2IV(entry)));
End of Patch.

Reply via email to