Package: libgraph-perl Version: 1:0.9716-1 Severity: grave The attached script, which tests the transitive closure function, prints this output on testing:
input: A-NOTA,B-A,B-NOTA Use of uninitialized value $_ in exists at /usr/share/perl5/Graph.pm line 362. Use of uninitialized value $_ in exists at /usr/share/perl5/Graph.pm line 362. output: A-A,A-B,B-B,NOTA-NOTA output: A-B,NOTA-NOTA The correct output, as seen on buster: input: A-NOTA,B-A,B-NOTA output: A-A,A-NOTA,B-A,B-B,B-NOTA,NOTA-NOTA output: A-NOTA,B-A,B-NOTA,NOTA-NOTA Empirically, the delete_vertex call is necessary for the repro. I think this is certainly release critical. I chose "grave" rather than "serious" since this can produce corrupted output in data processing situations, where the corrupted output might not be detected. In my Debian tally sheet processing program https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=appendix-a6.git (`compute`, there), this can produce totally wrong answers for the winner of votes. Ian.
#!/usr/bin/perl -w use strict; use Graph::Directed; my $input = Graph::Directed->new; foreach my $e (qw( A-C A-NOTA B-A B-C B-NOTA )) { my ($x,$y) = split /-/, $e; $input->add_edge($x,$y); } $input->delete_vertex('C'); print "input: $input\n"; my $output = $input->transitive_closure(); print "output: $output\n"; foreach my $x (qw(A B C N)) { $output->delete_edge($x,$x); } print "output: $output\n";
-- Ian Jackson <ijack...@chiark.greenend.org.uk> These opinions are my own. Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.