From: Nicholas Clark Date: Sun, 4 Feb 2007 11:54:14 +0000 (+0000) Subject: Provide a fixed $DynaLoader::XS_VERSION of 1.05, to fix bug #32539 X-Git-Tag: perl-5.8.9-RC1~832 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/2c90d8f17b785ebd530d57731d718877b18e87ca Provide a fixed $DynaLoader::XS_VERSION of 1.05, to fix bug #32539 whilst also allowing $DynaLoader::VERSION to be incremented (and DynaLoader upgraded) p4raw-id: //depot/maint-5.8/perl@30112 --- diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index aff74a4..ee81d93 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -27,10 +27,26 @@ package DynaLoader; # # Tim.Bunce@ig.co.uk, 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; diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL index 83cbd77..5dad27b 100644 --- a/ext/DynaLoader/Makefile.PL +++ b/ext/DynaLoader/Makefile.PL @@ -8,6 +8,7 @@ WriteMakefile( 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',