Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 117158
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc: pali [...] cpan.org
ribasushi [...] leporine.io
AdminCc:

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



Subject: Encode 2.85+ breaks Encode::ISO2202JP2
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 256

See https://rt.cpan.org/Ticket/Display.html?id=117157

As of 2.85, the following block of code simply eats memory and never returns:

require Encode::ISO2022JP2;
my $text = Encode::encode( 'iso2022jp-2', chr(720) );

MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
Content-Type: text/html; charset="utf-8"
Message-ID: <rt-4.0.18-20008-1471947874-518.117158-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 400

Throwing callgrind at it, the hotpoint in XS appears to start here:

 

https://metacpan.org/source/DANKOGAI/Encode-2.86/Encode.xs#L194

 

For an input of *one* character, that was called 200,000 times before I hit ^C

 

So if I had to guess I'd say the containing while loop never progresses enough to an exit condition.

MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-26397-1473845048-764.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-26397-1473845048-1473.117158-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: ppisar [...] redhat.com
Content-Length: 376
Download (untitled) / with headers
text/plain 376b
Dne Út 23.srp.2016 05:08:22, KENTNL napsal(a): Show quoted text
> See https://rt.cpan.org/Ticket/Display.html?id=117157 > > As of 2.85, the following block of code simply eats memory and never > returns: > > require Encode::ISO2022JP2; > my $text = Encode::encode( 'iso2022jp-2', chr(720) );
Encode-JISX0213 also experiences the same problem when performing its t/JISX0213.t test. -- Petr
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-17832-1471943302-1453.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-21333-1477657912-1201.117158-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 305
Download (untitled) / with headers
text/plain 305b
On Uto Aug 23 05:08:22 2016, KENTNL wrote: Show quoted text
> See https://rt.cpan.org/Ticket/Display.html?id=117157 > > As of 2.85, the following block of code simply eats memory and never > returns: > > require Encode::ISO2022JP2; > my $text = Encode::encode( 'iso2022jp-2', chr(720) );
Should be fixed in Encode 2.87.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.