Change 30112 by [EMAIL PROTECTED] on 2007/02/04 11:54:14

        Provide a fixed $DynaLoader::XS_VERSION of 1.05, to fix bug #32539
        whilst also allowing $DynaLoader::VERSION to be incremented (and
        DynaLoader upgraded)

Affected files ...

... //depot/maint-5.8/perl/ext/DynaLoader/DynaLoader_pm.PL#11 edit
... //depot/maint-5.8/perl/ext/DynaLoader/Makefile.PL#2 edit

Differences ...

==== //depot/maint-5.8/perl/ext/DynaLoader/DynaLoader_pm.PL#11 (text) ====
Index: perl/ext/DynaLoader/DynaLoader_pm.PL
--- perl/ext/DynaLoader/DynaLoader_pm.PL#10~23524~      2004-11-22 
07:20:18.000000000 -0800
+++ perl/ext/DynaLoader/DynaLoader_pm.PL        2007-02-04 03:54:14.000000000 
-0800
@@ -27,10 +27,26 @@
 #
 # [EMAIL PROTECTED], August 1994
 
-use vars qw($VERSION *AUTOLOAD);
+use vars qw($VERSION *AUTOLOAD $XS_VERSION);
 
 $VERSION = '1.05';     # avoid typo warning
 
+# See http://rt.perl.org/rt3//Public/Bug/Display.html?id=32539
+# for why we need this. Basically any embedded code will have 1.05 hard-coded
+# in it as the XS_VERSION to check against. If a shared libperl is upgraded,
+# then it will pull in a newer DynaLoader.pm file, because the shared libperl
+# provides the paths for @INC. The file in @INC provides the
+# $DynaLoader::XS_VERSION that the existing embedded code checks against, so
+# we must keep this value constant, else bootstrap_DynaLoader will croak()
+# Whilst moving bootstrap_DynaLoader to the shared libperl is the correct
+# long-term fix, it doesn't help current installations, as they're still
+# going to find the boot_DynaLoader linked to them (with its hard-coded 1.05)
+# (It's found via a passed in function pointer in the xsinit parameter to
+# perl_parse, and in turn that is typically the static function xs_init
+# defined in the same place as the caller to perl_parse, and at the same time,
+# so compiled in and installed as binaries now deployed.)
+$XS_VERSION = '1.05';
+
 require AutoLoader;
 *AUTOLOAD = \&AutoLoader::AUTOLOAD;
 

==== //depot/maint-5.8/perl/ext/DynaLoader/Makefile.PL#2 (text) ====
Index: perl/ext/DynaLoader/Makefile.PL
--- perl/ext/DynaLoader/Makefile.PL#1~17645~    2002-07-19 12:29:57.000000000 
-0700
+++ perl/ext/DynaLoader/Makefile.PL     2007-02-04 03:54:14.000000000 -0800
@@ -8,6 +8,7 @@
     SKIP       => [qw(dynamic dynamic_lib dynamic_bs)],
     XSPROTOARG => '-noprototypes',             # XXX remove later?
     VERSION_FROM => 'DynaLoader_pm.PL',
+    XS_VERSION  => '1.05',
     PL_FILES   => {'DynaLoader_pm.PL'=>'DynaLoader.pm',
                    'XSLoader_pm.PL'=>'XSLoader.pm'},
     PM         => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm',
End of Patch.

Reply via email to