Skip Menu |

This queue is for tickets about the Algorithm-QuineMcCluskey CPAN distribution.

Report information
The Basics
Id: 125391
Status: resolved
Priority: 0/
Queue: Algorithm-QuineMcCluskey

People
Owner: jgamble [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.16
  • 0.17
Fixed in: 0.18



Subject: SEGV with perl 5.27.x and 5.28.0 RC1
With perl 5.28.0 RC1 (and later versions in the 5.27.x series) some test scripts fail with segmentation faults: Test Summary Report ------------------- t/13-solvesimple.t (Wstat: 11 Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 1 tests but ran 0. t/24-solve.t (Wstat: 11 Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 3 tests but ran 0. t/27-solve.t (Wstat: 11 Tests: 1 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 2 tests but ran 1. Files=18, Tests=36, 3 wallclock secs ( 0.04 usr 0.08 sys + 2.42 cusr 0.37 csys = 2.91 CPU) Result: FAIL Failed 3/18 test programs. 0/36 subtests failed. This seems to be caused by List-MoreUtils-XS. See https://rt.perl.org/Ticket/Display.html?id=132671
Rejected for having nothing to do with the module in question, and for being based on non-stable versions of Perl.
On 2018-06-05 18:16:05, JGAMBLE wrote: Show quoted text
> Rejected for having nothing to do with the module in question, and for > being based on non-stable versions of Perl.
Please that that 5.28.0 RC1 + RC2 is as good as a stable version of perl --- there will be no changes in the real 5.28.0.
On 2018-06-08 01:39:51, SREZIC wrote: Show quoted text
> On 2018-06-05 18:16:05, JGAMBLE wrote:
> > Rejected for having nothing to do with the module in question, and > > for > > being based on non-stable versions of Perl.
> > Please that that 5.28.0 RC1 + RC2 is as good as a stable version of > perl --- there will be no changes in the real 5.28.0.
The mentioned perl ticket was removed from the 5.28 blockers which means that the problem won't be solved in perl. The linked CPAN ticket for List::MoreUtils was closed without a resolution for this problem. There's a new ticket for List::MoreUtils, but it seems to me that this ticket is stalled: https://rt.cpan.org/Ticket/Display.html?id=123989 Of course it would be best if the issue was fixed in List::MoreUtils. Another possibility is to not use List::MoreUtils::pairwise, or to use the pure perl variant which does not seem to be affected: diff --git i/lib/Algorithm/QuineMcCluskey/Util.pm w/lib/Algorithm/QuineMcCluskey/Util.pm index bd0ba46..67bf521 100644 --- i/lib/Algorithm/QuineMcCluskey/Util.pm +++ w/lib/Algorithm/QuineMcCluskey/Util.pm @@ -11,7 +11,9 @@ use strict; use warnings; use 5.010001; -use List::MoreUtils qw(any pairwise indexes uniq firstidx); +use List::MoreUtils qw(any indexes uniq firstidx); +use List::MoreUtils::PP; +BEGIN { *pairwise = \&List::MoreUtils::PP::pairwise } use List::Compare::Functional qw(is_LequivalentR is_LsubsetR); use Exporter; However it does not look like using the PP variant is sanctioned by the List::MoreUtils documentation.
On 2018-06-08 01:39:51, SREZIC wrote: Show quoted text
> On 2018-06-05 18:16:05, JGAMBLE wrote:
> > Rejected for having nothing to do with the module in question, and > > for > > being based on non-stable versions of Perl.
> > Please that that 5.28.0 RC1 + RC2 is as good as a stable version of > perl --- there will be no changes in the real 5.28.0.
And it is broken with perl 5.26.2 --- which IS the latest stable perl.
My tests with Perl 5.26.1 show no crashes, but I'm also using the latest version of List::MoreUtils, which has a fix to pairwise. The fix description doesn't seem to address this ticket, but on the other hand I'm not seeing the ticket's issue. So I've changed Build.PL to require version 0.428.
On 2018-06-21 22:44:52, JGAMBLE wrote: Show quoted text
> My tests with Perl 5.26.1 show no crashes, but I'm also using the > latest version of List::MoreUtils, which has a fix to pairwise.
5.26.1 was never affected. Please see http://matrix.cpantesters.org/?dist=Algorithm-QuineMcCluskey%200.16 In my tests the latest version of List::MoreUtils was also used. Show quoted text
> The fix description doesn't seem to address this ticket, but on the > other hand I'm not seeing the ticket's issue. So I've changed Build.PL > to require version 0.428.
I had to reopen the ticket. The segfaults with 5.26.2 and 5.28.0 still happen.
Maybe a timeline that sums up what are the relevant events helps to understand? I try to keep it terse. 2017-12-12 commit 16ada235c3 to bleadperl by Zefram; Subject: "fix GvSV refcounting in sort"; https://perl5.git.perl.org/perl.git/commitdiff/16ada235c332e017667585e1a5a00ce43a31c529; 2018-01-01 Bleadperl-breaks-CPAN-issue posted; https://rt.perl.org/Public/Bug/Display.html?id=132671; JGAMBLE/Algorithm-QuineMcCluskey-0.16.tar.gz now known to be broken by this commit; it's being suggested that the real bug is in List-MoreUtils-XS 2018-03-12 commit 6a4c4e874d cherry-picks that same commit into 5.26; https://perl5.git.perl.org/perl.git/commitdiff/6a4c4e874d 2018-06-24 Up to date no fix to List-MoreUtils-XS has been released. Combinations of current List-MoreUtils-XS-0.428 and current Algorithm-QuineMcCluskey-0.17 with either perl 5.28.0 or 5.26.2 are broken. They fail to run the test suite of Algorithm-QuineMcCluskey.
Combining the Hamming distance and difference position functions also resulted involved removing calls to pairwise(), which is the source of the issue.