Skip Menu |

This queue is for tickets about the Bio-PrimerDesigner CPAN distribution.

Report information
The Basics
Id: 85968
Status: open
Priority: 0/
Queue: Bio-PrimerDesigner

People
Owner: Nobody in particular
Requestors: dam [...] cpan.org
gregoa [...] debian.org
Cc:
AdminCc:

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



From: gregoa [...] cpan.org
Subject: libbio-primerdesigner-perl: FTBFS with perl 5.18: test failures
This bug has been forwarded from http://bugs.debian.org/711426 Source: libbio-primerdesigner-perl Version: 0.07-1 Severity: important User: debian-perl@lists.debian.org Usertags: perl-5.18-transition Tags: sid jessie This package FTBFS with perl 5.18 from experimental (in a clean sbuild session): # Failed test 'The class isa Bio::PrimerDesigner::Result' # at t/result.t line 20. # The class isn't a 'Bio::PrimerDesigner::Result' it's a '' Can't locate object method "left" via package "Required design paramaters are missing" (perhaps you forgot to load "Required design paramaters are missing"?) at t/result.t line 22. # Looks like you planned 3 tests but ran 2. # Looks like you failed 1 test of 2 run. # Looks like your test exited with 255 just after 2. t/result.t ........... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/3 subtests Note also the following warnings which appear throughout: Use of uninitialized value in lc at /build/dom-libbio-primerdesigner-perl_0.07-1 -i386-DVHEtP/libbio-primerdesigner-perl-0.07/blib/lib/Bio/PrimerDesigner.pm line 244. Use of each() on hash after insertion without resetting hash iterator results in undefined behavior, Perl interpreter: 0x8c8e008 at /build/dom-libbio-primerdesigner-perl_0.07-1-i386-DVHEtP/libbio-primerdesigner-perl-0.07/blib/lib/Bio/PrimerDesigner/primer3.pm line 109. -- Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5 from the.earth.li (keyserver,web,email) Thanks in advance, gregor herrmann, Debian Perl Group
Subject: Bio-PrimerDesigner: test failures with perl 5.18
Attached is a patch that avoids changing the hash inside the each loop. Tests now pass with perl 5.18. The "Use of uninitialized value in lc" warnings are still there.
Subject: no-hash-manipulation-inside-each.patch
Description: avoid changing hash keys in an "each %hash" loop This leads to undefined behaviour Instead, mark what needs to be added/deleted and do it outside of the loop. Bug-Debian: http://bugs.debian.org/711426 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=85968 Author: Damyan Ivanov <dmn@debian.org> Forwarded: yes --- a/lib/Bio/PrimerDesigner/primer3.pm +++ b/lib/Bio/PrimerDesigner/primer3.pm @@ -106,12 +106,16 @@ that can be used to call result methods. # my %aliases = $self->list_aliases; my %lookup = reverse %aliases; + my @delete; + my %add; while ( my ( $k, $v ) = each %$args ) { next if exists $aliases{ $k }; my $alias = $lookup{ $k } or return $self->error("No alias for '$k'"); - delete $args->{ $k }; - $args->{ $alias } = $v; + push @delete, $k; + $add{ $alias } = $v; } + delete $args->{$_} for @delete; + $args->{$_} = $add{$_} for keys %add; # # Check that everything required is present.
Show quoted text
> Attached is a patch that avoids changing the hash inside the each > loop. Tests now pass with perl 5.18. > > The "Use of uninitialized value in lc" warnings are still there.
Hi, Did you have a chance to look at that patch? Would it be OK to include it in a future release of Bio-PrimerDesigner? Cheers, dam