Dne Po 22.pro.2014 02:49:27, SREZIC napsal(a):
Show quoted text> Compilation fails with perl 5.21.7:
>
> ccache cc -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-
> aliasing -pipe -fstack-protector -I/usr/local/include
> -D_FORTIFY_SOURCE=2 -O -DVERSION=\"1.44\" -DXS_VERSION=\"1.44\"
> -DPIC -fPIC "-I/usr/perl5.21.7/lib/5.21.7/amd64-freebsd/CORE"
> FindRef.c
> FindRef.xs: In function 'XS_Devel__FindRef_find_':
> FindRef.xs:106: error: 'SV' has no member named 'xpadn_ourstash'
> *** [FindRef.o] Error code 1
This looks like a bug introduced by perl commit:
commit 0f94cb1fe27e58a59d3391214dab34037ab184db
Author: Father Chrysostomos <sprout@cpan.org>
Date: Thu Nov 27 22:30:54 2014 -0800
[perl #123223] Make PADNAME a separate type
distinct from SV. This should fix the CPAN modules that were failing
when the PadnameLVALUE flag was added, because it shared the same
bit as SVs_OBJECT and pad names were going through code paths not
designed to handle pad names.
Unfortunately, it will probably break other CPAN modules, but I think
this change is for the better, as it makes both pad names and SVs sim-
pler and makes pad names take less memory.
According to the changed code:
if (type >= SVt_PVMG) {
- if (type == SVt_PVMG && SvPAD_OUR(sv)) {
- HV * const ost = SvOURSTASH(sv);
- if (ost)
- do_hv_dump(level, file, " OURSTASH", ost);
- } else {
- if (SvMAGIC(sv))
+ if (SvMAGIC(sv))
do_magic_dump(level, file, SvMAGIC(sv), nest+1, maxnest, dumpops, pvlim);
- }
if (SvSTASH(sv))
do_hv_dump(level, file, " STASH", SvSTASH(sv));
it looks like the FindRef.xs code copies the branching:
if (SvTYPE (sv) >= SVt_PVMG)
{
if (SvTYPE (sv) == SVt_PVMG && SvPAD_OUR (sv))
{
/* I have no clue what this is */
/* maybe some placeholder for our variables for eval? */
/* it doesn't seem to reference anything, so we should be able to ignore it */
}
else if (SvMAGICAL (sv)) /* name-pads use SvMAGIC for other purposes */
and the hole (SvTYPE (sv) == SVt_PVMG && SvPAD_OUR (sv)) branch can be removed.