The leak's been there for a while, but I couldn't find
other reports of it:

   https://rt.cpan.org/Public/Bug/Display.html?id=139622

Anybody else want to try this and see which versions of Encode
or Perl hit this leak?  Encode is bundled with Perl, but at
least Debian also provides an optional standalone package, too.

In the meantime, I may need to put in my own workaround for it
PublicInbox::Eml because distros are slow moving...

----8<----
#!perl -w
use v5.10.1;
use Encode qw(decode);
say "Encode::VERSION=$Encode::VERSION";
my $blob = "\xef\xbf\xbd" x 1000;
my $nr = $ENV{NR} || 10000; # higher => more memory
my $warn = $ENV{FB_WARN};
for (0..$nr) {
        if ($warn) {
                decode('us-ascii', $blob, Encode::FB_WARN);
        } else {
                eval { decode('us-ascii', $blob, Encode::FB_CROAK) };
        }
}
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to