develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128517] ExtUtils::ParseXS: Please make the outputreproducible

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
July 2, 2016 12:40
Subject:
[perl #128517] ExtUtils::ParseXS: Please make the outputreproducible
Message ID:
rt-4.0.18-31481-1467463202-1649.128517-15-0@perl.org
On Sat Jul 02 01:05:26 2016, carnil@debian.org wrote:
> Hi
> 
> Chris Lamb working on the "reproducible builds" effort [0] reported
> that the output generated by ExtUtils::ParseXS is non-deterministic
> and proposed a patch both in [1] and [2], basically boiling down to:
> 
> diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
> b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
> index 0987500..dd1c3f2 100644
> --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
> +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
> @@ -686,7 +686,7 @@ EOF
>          var         => $_,
>          do_setmagic => $self->{DoSetMagic},
>          do_push     => undef,
> -      } ) for grep $self->{in_out}->{$_} =~ /OUT$/, keys %{ $self-
> >{in_out} };
> +      } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{
> $self->{in_out} };
> 
> my $prepush_done;
> # all OUTPUT done, so now push the return value on the stack
> 
> Could you consider applying it in a next update of ExtUtils::ParseXS?
> 
> Regards,
> Salvatore
> 
> [0] https://wiki.debian.org/ReproducibleBuilds
> [1] https://bugs.debian.org/829295
> [2] https://bugs.debian.org/829296

Other things being equal, I would expect the introduction of a 'sort' function at that point to cause a performance hit.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=128517

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About