Skip Menu |

This queue is for tickets about the Data-Alias CPAN distribution.

Report information
The Basics
Id: 100944
Status: resolved
Priority: 0/
Queue: Data-Alias

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: CARNIL [...] cpan.org
ether [...] cpan.org
gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.18
Fixed in: (no value)



Subject: Test failure with perl 5.21.6
If the patch from https://rt.cpan.org/Ticket/Display.html?id=98758 is applied, then "make test" still fails for perl 5.21.6: # Failed test at t/03_copy.t line 20. # got: 'SCALAR(0xe2a3d8)' # expected: anything else # Failed test at t/03_copy.t line 21. # got: 'SCALAR(0xe2a3d8)' # expected: anything else # Looks like you failed 2 tests of 14. t/03_copy.t .............. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/14 subtests ... # Failed test at t/05_alias_parse2.t line 50. # got: 'SCALAR(0x1719280)' # expected: 'SCALAR(0x17b1cd8)' # Looks like you failed 1 test of 17. t/05_alias_parse2.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/17 subtests
RT-Send-CC: ANDK [...] cpan.org
On Tue Dec 16 03:32:18 2014, SREZIC wrote: Show quoted text
> If the patch from https://rt.cpan.org/Ticket/Display.html?id=98758 is > applied, then "make test" still fails for perl 5.21.6: > > # Failed test at t/03_copy.t line 20. > # got: 'SCALAR(0xe2a3d8)' > # expected: anything else > > # Failed test at t/03_copy.t line 21. > # got: 'SCALAR(0xe2a3d8)' > # expected: anything else > # Looks like you failed 2 tests of 14. > t/03_copy.t .............. Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/14 subtests > > ... > > # Failed test at t/05_alias_parse2.t line 50. > # got: 'SCALAR(0x1719280)' > # expected: 'SCALAR(0x17b1cd8)' > # Looks like you failed 1 test of 17. > t/05_alias_parse2.t ...... Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/17 subtests
Bisect? (Sorry if I sound too demanding.)
np:) v5.21.5-9-g6aa6830
RT-Send-CC: ANDK [...] cpan.org
On Tue Dec 16 16:40:52 2014, ANDK wrote: Show quoted text
> np:) > > v5.21.5-9-g6aa6830
Thank you. This module is crazy. It is making my head hurt. :-( If you apply this patch on top of the patch from the other ticket and test it with bleadperl as of now (8be81792ba), do you get malloc errors? If so, could you try bisecting with these patches applied?
Subject: unfinished-patch.txt
diff -rup Data-Alias-1.18-7uiCBM-orig/Alias.xs Data-Alias-1.18-7uiCBM/Alias.xs --- Data-Alias-1.18-7uiCBM-orig/Alias.xs 2014-12-16 14:56:52.000000000 -0800 +++ Data-Alias-1.18-7uiCBM/Alias.xs 2014-12-20 06:09:38.000000000 -0800 @@ -137,6 +137,11 @@ #define IS_PADGV(x) 0 #endif +#ifndef PadnamelistARRAY +#define PadnamelistARRAY AvARRAY +#define PadnameOUTER SvFAKE +#endif + #define DA_HAVE_OP_PADRANGE (PERL_COMBI_VERSION >= 5017006) #if DA_HAVE_OP_PADRANGE @@ -225,6 +230,8 @@ static char const msg_no_symref[] = STATIC OP *(*da_old_ck_rv2cv)(pTHX_ OP *op); STATIC OP *(*da_old_ck_entersub)(pTHX_ OP *op); +STATIC OP *(*da_old_ck_aelem)(pTHX_ OP *op); +STATIC OP *(*da_old_ck_helem)(pTHX_ OP *op); #ifdef USE_ITHREADS @@ -1489,7 +1496,9 @@ STATIC OP *DataAlias_pp_copy(pTHX) { STATIC void da_lvalue(pTHX_ OP *op, int list) { switch (op->op_type) { case OP_PADSV: op->op_ppaddr = DataAlias_pp_padsv; - if (SvFAKE(AvARRAY(PL_comppad_name)[op->op_targ]) + if (PadnameOUTER( + PadnamelistARRAY(PL_comppad_name) + [op->op_targ]) && ckWARN(WARN_CLOSURE)) Perl_warner(aTHX_ packWARN(WARN_CLOSURE), DA_OUTER_ERR); @@ -1501,7 +1510,8 @@ STATIC void da_lvalue(pTHX_ OP *op, int int i; if (!list) goto bad; for(i = start; i != start+count; i++) { - if (SvFAKE(AvARRAY(PL_comppad_name)[i]) + if (PadnameOUTER( + PadnamelistARRAY(PL_comppad_name)[i]) && ckWARN(WARN_CLOSURE)) Perl_warner(aTHX_ packWARN(WARN_CLOSURE), DA_OUTER_ERR); @@ -1785,7 +1795,7 @@ STATIC int da_transform(pTHX_ OP *op, in } STATIC void da_peep2(pTHX_ OP *o) { - OP *sib, *k; + OP *sib, *k, *o2; int useful; while (o->op_ppaddr != da_tag_list) { while ((sib = o->op_sibling)) { @@ -1805,14 +1815,20 @@ STATIC void da_peep2(pTHX_ OP *o) { useful = o->op_private & OPpUSEFUL; op_null(o); o->op_ppaddr = PL_ppaddr[OP_NULL]; - cLISTOPo->op_last = cUNOPx(cLISTOPo->op_first)->op_first; - k = o = cLISTOPo->op_first; + k = o2 = cLISTOPo->op_first; while ((sib = k->op_sibling)) k = sib; - if (!(sib = cUNOPo->op_first) || sib->op_ppaddr != da_tag_rv2cv) { + if (!(sib = cUNOPx(o2)->op_first) + || sib->op_ppaddr != da_tag_rv2cv) + { Perl_warn(aTHX_ "da peep weirdness 1"); } else { +#ifdef op_sibling_splice + op_sibling_splice(o, k, 0, sib); +#else + cLISTOPo->op_last = sib; k->op_sibling = sib; +#endif if (!(k = sib->op_next) || k->op_ppaddr != da_tag_entersub) { Perl_warn(aTHX_ "da peep weirdness 2"); } else { @@ -2005,6 +2021,9 @@ STATIC OP *da_ck_entersub(pTHX_ OP *o) { kid->op_private |= OPpUSEFUL; else kid->op_private &= ~OPpUSEFUL; + /* Defeat list+pushmark optimisation from v5.21.5-9-g6aa6830. */ + assert(kUNOP->op_first->op_type == OP_PUSHMARK); + kUNOP->op_first->op_type = OP_CUSTOM; tmp = kLISTOP->op_first; if (inside) op_null(tmp); @@ -2016,6 +2035,9 @@ STATIC OP *da_ck_entersub(pTHX_ OP *o) { while (kid->op_sibling != last) kid = kid->op_sibling; kid->op_sibling = Nullop; +#ifdef op_sibling_splice + kid->op_lastsib = 1; +#endif cLISTOPx(cUNOPo->op_first)->op_last = kid; if (kid->op_type == OP_NULL && inside) kid->op_flags &= ~OPf_SPECIAL; @@ -2023,6 +2045,14 @@ STATIC OP *da_ck_entersub(pTHX_ OP *o) { return o; } +/* These two exist solely to defeat the multideref optimisation. */ +STATIC OP *da_ck_aelem(pTHX_ OP *o) { + return da_old_ck_aelem(aTHX_ o); +} +STATIC OP *da_ck_helem(pTHX_ OP *o) { + return da_old_ck_helem(aTHX_ o); +} + MODULE = Data::Alias PACKAGE = Data::Alias @@ -2040,6 +2070,10 @@ BOOT: PL_check[OP_RV2CV] = da_ck_rv2cv; da_old_ck_entersub = PL_check[OP_ENTERSUB]; PL_check[OP_ENTERSUB] = da_ck_entersub; + da_old_ck_aelem = PL_check[OP_AELEM]; + PL_check[OP_AELEM] = da_ck_aelem; + da_old_ck_helem = PL_check[OP_HELEM]; + PL_check[OP_HELEM] = da_ck_helem; } CvLVALUE_on(get_cv("Data::Alias::deref", TRUE)); da_old_peepp = PL_peepp;
With that patch I see no malloc errors. padrange fails like so: t/padrange.t ............. 1/38 # Failed test at t/padrange.t line 53. # Failed test at t/padrange.t line 54. # Failed test at t/padrange.t line 55. # Looks like you failed 3 tests of 38. t/padrange.t ............. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/38 subtests Which test are you most interested in? Maybe I can see something with valgrind.
RT-Send-CC: ANDK [...] cpan.org
On Sat Dec 20 17:26:18 2014, ANDK wrote: Show quoted text
> With that patch I see no malloc errors. padrange fails like so: > > t/padrange.t ............. 1/38 > # Failed test at t/padrange.t line 53. > > # Failed test at t/padrange.t line 54. > > # Failed test at t/padrange.t line 55. > # Looks like you failed 3 tests of 38. > t/padrange.t ............. Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/38 subtests > > Which test are you most interested in? Maybe I can see something with > valgrind.
padrange.t is what is giving me malloc errors. It is probably failing for you for the same reason: An SV address is getting passed to malloc as the size to allocate. A bisect with padrange.t is probably sufficient. Thank you.
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #100944] Test failure with perl 5.21.6
Date: Sun, 21 Dec 2014 14:35:45 +0100
To: bug-Data-Alias [...] rt.cpan.org
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Given the two patches to D:A applied, this bleadperl commit broke t/padrange.t: v5.21.6-352-gc46871e commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff Author: Father Chrysostomos <sprout@cpan.org> Date: Sun Dec 7 12:30:54 2014 -0800 op.c: Use scalar cx, not OA_RETSCALAR, for optimisations -- andreas
RT-Send-CC: ANDK [...] cpan.org
On Sun Dec 21 08:36:02 2014, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> Given the two patches to D:A applied, this bleadperl commit broke > t/padrange.t: v5.21.6-352-gc46871e > > commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff > Author: Father Chrysostomos <sprout@cpan.org> > Date: Sun Dec 7 12:30:54 2014 -0800 > > op.c: Use scalar cx, not OA_RETSCALAR, for optimisations >
In that commit I partially disabled an optimisation, resulting in an op tree that Data::Alias did not expect. I have restored the optimisation in commit d964400, and Data::Alias now passes all its tests with both these patches applied, even though the second one has ‘unfinished’ in the file name.
On 2014-12-22 17:55:59, SPROUT wrote: Show quoted text
> On Sun Dec 21 08:36:02 2014, andreas.koenig.7os6VVqR@franz.ak.mind.de > wrote:
> > Given the two patches to D:A applied, this bleadperl commit broke > > t/padrange.t: v5.21.6-352-gc46871e > > > > commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff > > Author: Father Chrysostomos <sprout@cpan.org> > > Date: Sun Dec 7 12:30:54 2014 -0800 > > > > op.c: Use scalar cx, not OA_RETSCALAR, for optimisations > >
> > In that commit I partially disabled an optimisation, resulting in an > op tree that Data::Alias did not expect. I have restored the > optimisation in commit d964400, and Data::Alias now passes all its > tests with both these patches applied, even though the second one has > ‘unfinished’ in the file name.
Patch is still needed for perl 5.21.10.
On 2015-03-20 16:13:26, SREZIC wrote: Show quoted text
> On 2014-12-22 17:55:59, SPROUT wrote:
> > On Sun Dec 21 08:36:02 2014, andreas.koenig.7os6VVqR@franz.ak.mind.de > > wrote:
> > > Given the two patches to D:A applied, this bleadperl commit broke > > > t/padrange.t: v5.21.6-352-gc46871e > > > > > > commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff > > > Author: Father Chrysostomos <sprout@cpan.org> > > > Date: Sun Dec 7 12:30:54 2014 -0800 > > > > > > op.c: Use scalar cx, not OA_RETSCALAR, for optimisations > > >
> > > > In that commit I partially disabled an optimisation, resulting in an > > op tree that Data::Alias did not expect. I have restored the > > optimisation in commit d964400, and Data::Alias now passes all its > > tests with both these patches applied, even though the second one has > > ‘unfinished’ in the file name.
> > Patch is still needed for perl 5.21.10. > >
And for the stable perl 5.22.0.
From: ppisar [...] redhat.com
Dne St 03.čen.2015 14:25:05, SREZIC napsal(a): Show quoted text
> On 2015-03-20 16:13:26, SREZIC wrote:
> > On 2014-12-22 17:55:59, SPROUT wrote:
> > > On Sun Dec 21 08:36:02 2014, andreas.koenig.7os6VVqR@franz.ak.mind.de > > > wrote:
> > > > Given the two patches to D:A applied, this bleadperl commit broke > > > > t/padrange.t: v5.21.6-352-gc46871e > > > > > > > > commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff > > > > Author: Father Chrysostomos <sprout@cpan.org> > > > > Date: Sun Dec 7 12:30:54 2014 -0800 > > > > > > > > op.c: Use scalar cx, not OA_RETSCALAR, for optimisations > > > >
> > > > > > In that commit I partially disabled an optimisation, resulting in an > > > op tree that Data::Alias did not expect. I have restored the > > > optimisation in commit d964400, and Data::Alias now passes all its > > > tests with both these patches applied, even though the second one has > > > ‘unfinished’ in the file name.
> > > > Patch is still needed for perl 5.21.10. > > > >
> > And for the stable perl 5.22.0.
If I apply all the three patches, it will compile, but tests will fail like a hell for me with perl-5.22.0: $ prove -b t/01_deref.t ............. ok t/03_copy.t .............. Useless use of anonymous hash ({}) in void context at t/03_copy.t line 19. # Looks like your test exited with 2 before it could output anything. t/03_copy.t .............. Dubious, test returned 2 (wstat 512, 0x200) Failed 14/14 subtests t/04_alias_parse.t ....... Not enough arguments for Test::More::is at t/04_alias_parse.t line 23, near "42;" Not enough arguments for Test::More::is at t/04_alias_parse.t line 28, near "42;" Not enough arguments for Test::More::is at t/04_alias_parse.t line 31, near "1;" Not enough arguments for Test::More::is at t/04_alias_parse.t line 33, near "1;" syntax error at t/04_alias_parse.t line 35, near ";x" syntax error at t/04_alias_parse.t line 36, near ";x" Not enough arguments for Test::More::is at t/04_alias_parse.t line 39, near "1;" Not enough arguments for Test::More::is at t/04_alias_parse.t line 41, near "1;" Global symbol "%lias" requires explicit package name (did you forget to declare "my %lias"?) at t/04_alias_parse.t line 48. BEGIN not safe after errors--compilation aborted at t/04_alias_parse.t line 59. # Looks like your test exited with 2 before it could output anything. t/04_alias_parse.t ....... Dubious, test returned 2 (wstat 512, 0x200) Failed 23/23 subtests t/04_swap.t .............. ok [etc.]
On 2015-06-18 04:44:44, ppisar wrote: Show quoted text
> Dne St 03.čen.2015 14:25:05, SREZIC napsal(a):
> > On 2015-03-20 16:13:26, SREZIC wrote:
> > > On 2014-12-22 17:55:59, SPROUT wrote:
> > > > On Sun Dec 21 08:36:02 2014, > > > > andreas.koenig.7os6VVqR@franz.ak.mind.de > > > > wrote:
> > > > > Given the two patches to D:A applied, this bleadperl commit > > > > > broke > > > > > t/padrange.t: v5.21.6-352-gc46871e > > > > > > > > > > commit c46871e754baf56ac611f9ee6d15b8b8c9cd15ff > > > > > Author: Father Chrysostomos <sprout@cpan.org> > > > > > Date: Sun Dec 7 12:30:54 2014 -0800 > > > > > > > > > > op.c: Use scalar cx, not OA_RETSCALAR, for optimisations > > > > >
> > > > > > > > In that commit I partially disabled an optimisation, resulting in > > > > an > > > > op tree that Data::Alias did not expect. I have restored the > > > > optimisation in commit d964400, and Data::Alias now passes all > > > > its > > > > tests with both these patches applied, even though the second one > > > > has > > > > ‘unfinished’ in the file name.
> > > > > > Patch is still needed for perl 5.21.10. > > > > > >
> > > > And for the stable perl 5.22.0.
> > If I apply all the three patches, it will compile, but tests will fail > like a hell for me with perl-5.22.0: > > $ prove -b > t/01_deref.t ............. ok > t/03_copy.t .............. Useless use of anonymous hash ({}) in void > context at t/03_copy.t line 19. > # Looks like your test exited with 2 before it could output anything. > t/03_copy.t .............. Dubious, test returned 2 (wstat 512, 0x200) > Failed 14/14 subtests > t/04_alias_parse.t ....... Not enough arguments for Test::More::is at > t/04_alias_parse.t line 23, near "42;" > Not enough arguments for Test::More::is at t/04_alias_parse.t line 28, > near "42;" > Not enough arguments for Test::More::is at t/04_alias_parse.t line 31, > near "1;" > Not enough arguments for Test::More::is at t/04_alias_parse.t line 33, > near "1;" > syntax error at t/04_alias_parse.t line 35, near ";x" > syntax error at t/04_alias_parse.t line 36, near ";x" > Not enough arguments for Test::More::is at t/04_alias_parse.t line 39, > near "1;" > Not enough arguments for Test::More::is at t/04_alias_parse.t line 41, > near "1;" > Global symbol "%lias" requires explicit package name (did you forget > to declare "my %lias"?) at t/04_alias_parse.t line 48. > BEGIN not safe after errors--compilation aborted at t/04_alias_parse.t > line 59. > # Looks like your test exited with 2 before it could output anything. > t/04_alias_parse.t ....... Dubious, test returned 2 (wstat 512, 0x200) > Failed 23/23 subtests > t/04_swap.t .............. ok > > [etc.]
For a successful compile & test, I have to apply the last three patches mentioned in https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Data-Alias.yml (or just use this distroprefs file with CPAN.pm). This works for me on Debian wheezy, Debian jessie, FreeBSD 9.2 and FreeBSD 10.1.
RT-Send-CC: ppisar [...] redhat.com, ANDK [...] cpan.org
On 2015-06-18 10:33:48, SREZIC wrote: Show quoted text
> For a successful compile & test, I have to apply the last three > patches mentioned in > https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Data- > Alias.yml > (or just use this distroprefs file with CPAN.pm). This works for me on > Debian wheezy, Debian jessie, FreeBSD 9.2 and FreeBSD 10.1.
I'm happy to help out with getting this release out if tuits are in short supply.
From: ppisar [...] redhat.com
Dne Čt 18.čen.2015 04:44:44, ppisar napsal(a): Show quoted text
> If I apply all the three patches, it will compile, but tests will fail > like a hell for me with perl-5.22.0: > > $ prove -b > t/01_deref.t ............. ok > t/03_copy.t .............. Useless use of anonymous hash ({}) in void > context at t/03_copy.t line 19.
It looks like there is problem with aliasing {} blocks. Only tests exhibiting the the curly bracket statements seems failing.
From: paul [...] city-fan.org
On Fri Jun 19 02:00:22 2015, ppisar wrote: Show quoted text
> Dne Čt 18.čen.2015 04:44:44, ppisar napsal(a):
> > If I apply all the three patches, it will compile, but tests will > > fail > > like a hell for me with perl-5.22.0: > > > > $ prove -b > > t/01_deref.t ............. ok > > t/03_copy.t .............. Useless use of anonymous hash ({}) in void > > context at t/03_copy.t line 19.
> > It looks like there is problem with aliasing {} blocks. Only tests > exhibiting the the curly bracket statements seems failing.
I wonder if this is anything to do with Fedora's perl being threaded? There was an issue with Test-Vars 0.006 that was fixed for "regular" 5.22.0 but still broke in Fedora perl, which is threaded. Perhaps this is something similar?
FWIW, I'm getting the same test failures as ppisar when I add SREZIC's 3 patches in debian/unstable with perl 5.22.0 from experimental. Cheers, gregor
Anything new here? We are about to upload Perl 5.22 to Debian/unstable soon, which means this module will have to be removed from testing first, and later from the archive completely. Any help welcome! Cheers, gregor, Debian Perl Group
Fixed in Data-Alias-1.19, now on CPAN.
Unfortunately I'm still seeing problems with 1.19 under perl 5.22 on Debian unstable; it builds but the test suite fails. Log attached. Cheers, gregor
Subject: libdata-alias-perl_1.19-1_amd64.build
Download libdata-alias-perl_1.19-1_amd64.build
application/octet-stream 33.2k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #100944] Test failure with perl 5.21.6
Date: Wed, 21 Oct 2015 16:45:28 +0100
To: gregor herrmann via RT <bug-Data-Alias [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
gregor herrmann via RT wrote: Show quoted text
>Unfortunately I'm still seeing problems with 1.19 under perl 5.22 on Debian unstable; it builds but the test suite fails.
This is a different problem. Please open a new ticket for it, and please include the full perl -V output. I don't see that behaviour on a stock 5.22. -zefram
Subject: Re: [rt.cpan.org #100944] Test failure with perl 5.21.6
Date: Wed, 21 Oct 2015 23:34:33 +0100
To: gregor herrmann via RT <bug-Data-Alias [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
The new problem is fixed in Data-Alias-1.20, now on CPAN. -zefram
Subject: Re: [rt.cpan.org #100944] Test failure with perl 5.21.6
Date: Thu, 22 Oct 2015 19:25:41 +0200
To: Zefram via RT <bug-Data-Alias [...] rt.cpan.org>
From: gregor herrmann <gregoa [...] debian.org>
On Wed, 21 Oct 2015 18:34:47 -0400, Zefram via RT wrote: Show quoted text
> The new problem is fixed in Data-Alias-1.20, now on CPAN.
Great. Tested on Debian and uploaded. Many thanks! Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Simon & Garfunkel: Bridge Over Troubled Water
Download signature.asc
application/pgp-signature 949b

Message body not shown because it is not plain text.