Front page | perl.perl5.porters |
Postings from July 2007
RE: Beyond 5.10
From: Jan Dubois
July 6, 2007 10:41
RE: Beyond 5.10
Message ID: 046b01c7bff4$cfed2860$6fc77920$@com
On Fri, 06 Jul 2007, Andy Dougherty wrote:
> On Fri, 6 Jul 2007, Johan Vromans wrote:
> > Andy Dougherty <email@example.com> writes:
> > > On Fri, 6 Jul 2007, Alexey Tourbin wrote:
> > >> [...] perl modules compiled against perl-5.8.9
> > >> will no longer work under perl-5.8.8.
> > >
> > > I don't think this direction has ever been guaranteed,
> > Actually, I'd expect any 5.8.x release to be forward and backward
> > compatible with any other 5.8.x, modulo bugs.
Backwards compatible yes, but forwards compatible has never worked in
Perl maintenance branches.
> > That is one of the things that went wrong with 5.8.1.
It broke backwards compatibility by reordering stuff in the reenter.* files.
This has been restored in 5.8.2.
There is one other breakage where certain global variables have been
made interpreter variables, or interpreter variables made thread
variable. This has never been fixed. The only breakage is from
PL_comppad and breaks about 8 modules on all of CPAN IIRC.
> That would indeed be nice, but I don't recall it ever being guaranteed.
> Note I'm talking about binary compatibility of XS modules here -- building
> a module under 5.8.9 and expecting 5.8.8 to be able to load it without
> trouble. That's part of the reasoning behind this comment in intrpvar.h:
> * Within a stable branch, new variables must be added to the very end, before
> * this comment, for binary compatibility (the offsets of the old members must
> * not change).
This is required for backwards compatibility. If you change structure
offsets, then old modules will break. If you only add new members at the
end, then old modules don't know about them and will never access them.
Everything they know about is still where it used to be.
New modules accessing new structures members at the end will break when
loaded in an older Perl because the older Perl didn't allocate the
additional space in the structure. So you'll end up corrupting memory.
Providing forward compatibility means you cannot add any new variables,
structure members or API functions; the only thing you can do is fix
broken algorithms in the existing implementation. This may make it
impossible to fix certain bugs.
This lack of forward compatibility is the reason all modules in the
ActiveState PPM repository have to be build with Perl 5.8.0. If you
build them with the latest Perl, then only the latest Perl can load
them. (Yes, the "obvious" workaround is to create a repository for each
Perl version, which we'll probably do, at least for the latest and