Skip Menu |

This queue is for tickets about the Params-Classify CPAN distribution.

Report information
The Basics
Id: 114490
Status: resolved
Priority: 0/
Queue: Params-Classify

People
Owner: Nobody in particular
Requestors: MAT [...] cpan.fsck.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.013
Fixed in: (no value)



Subject: Fails with 5.25 (and with 5.22 when -DPERL_OP_PARENT)
cc -I/usr/local/lib/perl5/5.25/mach/CORE -DVERSION="0.013" -DXS_VERSION="0.013" -DPIC -fPIC -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -o lib/Params/Classify.o lib/Params/Classify.c lib/Params/Classify.xs:628:14: error: no member named 'op_sibling' in 'struct op' if(!pushop->op_sibling) pushop = cUNOPx(pushop)->op_first; ~~~~~~ ^ lib/Params/Classify.xs:629:27: error: no member named 'op_sibling' in 'struct op' for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ; ~~~~ ^ lib/Params/Classify.xs:629:52: error: no member named 'op_sibling' in 'struct op' for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ; ~~~~ ^ lib/Params/Classify.xs:638:16: error: no member named 'op_sibling' in 'struct op' aop = pushop->op_sibling; ~~~~~~ ^ lib/Params/Classify.xs:639:13: error: no member named 'op_sibling' in 'struct op' bop = aop->op_sibling; ~~~ ^ lib/Params/Classify.xs:643:11: error: no member named 'op_sibling' in 'struct op' pushop->op_sibling = bop; ~~~~~~ ^ lib/Params/Classify.xs:644:8: error: no member named 'op_sibling' in 'struct op' aop->op_sibling = NULL; ~~~ ^ lib/Params/Classify.xs:651:24: error: no member named 'op_sibling' in 'struct op' } else if(bop && bop->op_sibling == cvop) { ~~~ ^ lib/Params/Classify.xs:670:11: error: no member named 'op_sibling' in 'struct op' pushop->op_sibling = cvop; ~~~~~~ ^ lib/Params/Classify.xs:671:8: error: no member named 'op_sibling' in 'struct op' aop->op_sibling = NULL; ~~~ ^ lib/Params/Classify.xs:672:8: error: no member named 'op_sibling' in 'struct op' bop->op_sibling = NULL; ~~~ ^ 11 errors generated.
From: wolfsage [...] gmail.com
Patch attached. -- Matthew Horsfall (alh)
Subject: op_sibling_fixes.patch
--- Params-Classify-0.013a/lib/Params/Classify.xs 2010-11-16 15:35:47.000000000 -0500 +++ Params-Classify-0.013b/lib/Params/Classify.xs 2017-03-26 15:38:12.384693301 -0400 @@ -41,6 +41,26 @@ # define FPTR2DPTR(t,x) ((t)(UV)(x)) #endif /* !FPTR2DPTR */ +#ifndef OpHAS_SIBLING +# define OpHAS_SIBLING(o) (cBOOL((o)->op_sibling)) +#endif + +#ifndef OpSIBLING +# define OpSIBLING(o) (0 + (o)->op_sibling) +#endif + +#ifndef OpMORESIB_set +# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib)) +#endif + +#ifndef OpLASTSIB_set +# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL) +#endif + +#ifndef OpMAYBESIB_set +# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib)) +#endif + #ifndef ptr_table_new struct q_ptr_tbl_ent { @@ -625,8 +645,8 @@ OP *(*ppfunc)(pTHX); I32 cvflags; pushop = cUNOPx(op)->op_first; - if(!pushop->op_sibling) pushop = cUNOPx(pushop)->op_first; - for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ; + if(!OpHAS_SIBLING(pushop)) pushop = cUNOPx(pushop)->op_first; + for(cvop = pushop; OpHAS_SIBLING(cvop); cvop = OpSIBLING(cvop)) ; if(!(cvop->op_type == OP_RV2CV && !(cvop->op_private & OPpENTERSUB_AMPER) && (cv = rvop_cv(cUNOPx(cvop)->op_first)) && @@ -635,20 +655,20 @@ return nxck_entersub(aTHX_ op); cvflags = CvXSUBANY(cv).any_i32; op = nxck_entersub(aTHX_ op); /* for prototype checking */ - aop = pushop->op_sibling; - bop = aop->op_sibling; + aop = OpSIBLING(pushop); + bop = OpSIBLING(aop); if(bop == cvop) { if(!(cvflags & PC_ALLOW_UNARY)) return op; unary: - pushop->op_sibling = bop; - aop->op_sibling = NULL; + OpLASTSIB_set(pushop, bop); + OpLASTSIB_set(aop, NULL); op_free(op); op = newUNOP(OP_NULL, 0, aop); op->op_type = OP_RAND; op->op_ppaddr = ppfunc; op->op_private = (U8)cvflags; return op; - } else if(bop && bop->op_sibling == cvop) { + } else if(bop && OpSIBLING(op) == cvop) { if(!(cvflags & PC_ALLOW_BINARY)) return op; if(ppfunc == THX_pp_check_sclass && (cvflags & PC_TYPE_MASK) == SCLASS_REF) { @@ -667,9 +687,9 @@ cvflags &= ~PC_TYPE_MASK; ppfunc = THX_pp_check_dyn_battr; } - pushop->op_sibling = cvop; - aop->op_sibling = NULL; - bop->op_sibling = NULL; + OpLASTSIB_set(pushop, cvop); + OpLASTSIB_set(aop, NULL); + OpLASTSIB_set(bop, NULL); op_free(op); op = newBINOP(OP_NULL, 0, aop, bop); op->op_type = OP_RAND;
On Sun Mar 26 15:40:47 2017, wolfsage@gmail.com wrote: Show quoted text
> Patch attached. > > -- Matthew Horsfall (alh)
Matt, I got the same ./Build failures as you did when trying to build Params-Classify against Perl 5 blead. ##### $ /home/jkeenan/testing/blead/bin/perl -v | head -2 | tail -1 This is perl 5, version 26, subversion 0 (v5.26.0 (v5.25.11-27-g1b92e69)) built for x86_64-linux ##### I can also confirm that applying your patch enabled ./Build to succeed and all tests to pass. ##### [Params-Classify-0.013] 518 $ patch -p1 < op_sibling_fixes.patch File lib/Params/Classify.xs is read-only; trying to patch anyway patching file lib/Params/Classify.xs [Params-Classify-0.013] 519 $ /home/jkeenan/testing/blead/bin/perl -I /home/jkeenan/testing/blead/lib Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Params-Classify' version '0.013' [Params-Classify-0.013] 520 $ ./Build Building Params-Classify cc -I/home/jkeenan/testing/blead/lib/perl5/5.26.0/x86_64-linux/CORE -DVERSION="0.013" -DXS_VERSION="0.013" -fPIC -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o lib/Params/Classify.o lib/Params/Classify.c ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Params/Classify/Classify.bs') cc -shared -O2 -L/usr/local/lib -fstack-protector-strong -o blib/arch/auto/Params/Classify/Classify.so lib/Params/Classify.o [Params-Classify-0.013] 521 $ ./Build test t/blessed.t ...... ok t/blessed_pp.t ... ok t/check.t ........ ok t/check_pp.t ..... ok t/classify.t ..... ok t/classify_pp.t .. ok t/error.t ........ ok t/error_pp.t ..... ok t/pod_cvg.t ...... ok t/pod_cvg_pp.t ... ok t/pod_syn.t ...... ok t/ref.t .......... ok t/ref_pp.t ....... ok All tests successful. Files=13, Tests=4749, 1 wallclock secs ( 0.33 usr 0.02 sys + 0.99 cusr 0.03 csys = 1.37 CPU) Result: PASS ##### Zefram, do you anticipate a new CPAN release soon? Thank you very much. Jim Keenan
Subject: Fails with 5.26, 5.25 (and with 5.22 when -DPERL_OP_PARENT)

Message body is not shown because it is too large.

Note: Additionally, tests will fail without PERL_USE_UNSAFE_INC=1 in environement due to tests relying on '.' in @INC in 'do'

>

do "t/setup_pp.pl" failed, '.' is no longer in @INC; did you mean do "./t/setup_pp.pl"? at t/blessed_pp.t line 4.
No such file or directory at t/blessed_pp.t line 4.
 

^ And many more.

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

Fortunately, the test failure is easy to fix:

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: 0001-Fix-for-.-in-INC.patch
From d612219a1a3bfe14f0cd1de59709724b35d7f21c Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentfredric@gmail.com> Date: Tue, 20 Jun 2017 05:45:39 +1200 Subject: [PATCH] Fix for '.' in @INC --- t/blessed_pp.t | 4 ++-- t/check_pp.t | 4 ++-- t/classify_pp.t | 4 ++-- t/error_pp.t | 4 ++-- t/pod_cvg_pp.t | 4 ++-- t/ref_pp.t | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/t/blessed_pp.t b/t/blessed_pp.t index 84caf74..e6d1865 100644 --- a/t/blessed_pp.t +++ b/t/blessed_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/blessed.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/blessed.t" or die $@ || $!; 1; diff --git a/t/check_pp.t b/t/check_pp.t index ce2ef1d..5564360 100644 --- a/t/check_pp.t +++ b/t/check_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/check.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/check.t" or die $@ || $!; 1; diff --git a/t/classify_pp.t b/t/classify_pp.t index facdab2..1dd9cbc 100644 --- a/t/classify_pp.t +++ b/t/classify_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/classify.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/classify.t" or die $@ || $!; 1; diff --git a/t/error_pp.t b/t/error_pp.t index 6473533..a018e32 100644 --- a/t/error_pp.t +++ b/t/error_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/error.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/error.t" or die $@ || $!; 1; diff --git a/t/pod_cvg_pp.t b/t/pod_cvg_pp.t index 960bc4f..8503674 100644 --- a/t/pod_cvg_pp.t +++ b/t/pod_cvg_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/pod_cvg.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/pod_cvg.t" or die $@ || $!; 1; diff --git a/t/ref_pp.t b/t/ref_pp.t index f3b5941..55f487d 100644 --- a/t/ref_pp.t +++ b/t/ref_pp.t @@ -1,7 +1,7 @@ use warnings; use strict; -do "t/setup_pp.pl" or die $@ || $!; -do "t/ref.t" or die $@ || $!; +do "./t/setup_pp.pl" or die $@ || $!; +do "./t/ref.t" or die $@ || $!; 1; -- 2.13.1
Please release a new version with the 5.026 fix, thanks! The test fix wasn't necessary for me.
Fixed in P:C-0.014, just released to CPAN.