Control: tags -1 patch

Hi Niko,

On Sun, Mar 26, 2017 at 8:23 PM, Niko Tyni <nt...@debian.org> wrote:
> On Fri, Mar 24, 2017 at 11:30:11AM +0200, Niko Tyni wrote:
>
>> I'll also work a bit on reducing the test further when I find the time.
>
> I got it down to this:
>
>   my $a = [ 0, 1 ];
>   sub f {
>     my $arg = shift;
>     my @a1 = @$a;
>     @$a = @a1;
>     return();
>   }
>   map{ f($_) } @$a;
>
>
> This looks to me like an instance of the general stack-not-refcounted
> issue, see https://rt.perl.org/Public/Bug/Display.html?id=77706 et al.
>
> But let's see what upstream says, I'll follow up there as well.

Thanks!

Seeing that they confirmed that and the refcounting issue is rather old
I think it would be reasonable to apply a workaround in nama.
The attached patch made nama build in current unstable.

Cheers,
Balint

-- 
Balint Reczey
Debian & Ubuntu Developer
Description: Work around Perl crash
 The construct used in nama triggers a segfault in Perl
 which surfaced recently in 5.23.3.
 Tracked in nama:
 https://rt.cpan.org/Public/Bug/Display.html?id=109852
 and in Perl:
 https://rt.perl.org/Public/Bug/Display.html?id=77706
 
Author: Balint Reczey <balint.rec...@canonical.com>
Bug: https://rt.perl.org/Public/Bug/Display.html?id=77706
Bug-Debian: https://bugs.debian.org/839218
Forwarded: no

--- a/lib/Audio/Nama/Effect.pm
+++ b/lib/Audio/Nama/Effect.pm
@@ -365,7 +365,8 @@
 		my ($minor_version) = $perl_version =~ /^v5\.(\d+)/;
 		my @new_list = grep  { $_ ne $id  } @ops_list;
 		#say "new_list: @new_list";
-		if ($minor_version <= 14) 
+		if ($minor_version <= 14 or $minor_version >= 24)
+                     # work around Perl bug #77706
 		     {    $track->{ops}   = [ @new_list  ] }
 		else { @{ $track->{ops} } =   @new_list    }
 	}
@@ -1254,4 +1255,4 @@
 
 } # end package Effect
 
-1
\ No newline at end of file
+1

Reply via email to