develooper Front page | perl.perl5.porters | Postings from May 2012

Re: [perl #29437] segfault on perl 5.8.4

From:
Nicholas Clark
Date:
May 1, 2012 02:25
Subject:
Re: [perl #29437] segfault on perl 5.8.4
Message ID:
20120501092541.GX9069@plum.flirble.org
On Sun, Apr 29, 2012 at 10:44:24AM -0700, Brian Fraser via RT wrote:
> On Mon May 10 08:18:54 2004, mjtg@cam.ac.uk wrote:
> > Nicholas Clark <nick@ccl4.org> wrote
> > > #1147 0x080ba90c in Perl_warner (err=44,
> > >     pat=0x400c1a00 "\"\\x{%04lx}\" does not map to %s") at
> > util.c:1346
> > 	...
> > > #1155 0x400cbdf0 in PerlIOEncode_flush (f=0x818592c) at
> > encoding.xs:419
> > 	...
> > > #1162 0x080ba90c in Perl_warner (err=44,
> > >     pat=0x400c1a00 "\"\\x{%04lx}\" does not map to %s") at
> > util.c:1346
> > 
> > Speaking in total ignorance of the code (and far too lazy to look at
> > it),
> > let me guess:
> > 
> > while (1) {
> >     Encode is generating a warning because it finds in its buffer a
> > character
> >     it can't convert.
> > 
> >     The perlIO routines do a flush, calling on Encode to flush its
> > buffers.
> > 
> >     Encode attempts to process the failing character.
> > }
> > 
> > If so, the fix is presumably to get Encode to step past the character
> > and/or replace it with something harmless *before* generating the
> > warning.
> > 
> > 
> > Mike Guy
> > 
> 
> 
> I can't reproduce any of the bugs in this ticket with newer Perls; so it
> seems that Encode was fixed. I vote to close this.

I ran this:

LC_ALL=pl_PL.ISO8859-2 ../perl/Porting/bisect.pl --expect-fail --start perl-5.8.0 -e 'use open OUT => ":locale"; print STDERR "\x{100}\n";'

It said this:

commit 74f6c1ca58b1c40741f55591ab97a77b6751f510
Author: Slaven Rezic <slaven@rezic.de>
Date:   Tue Feb 6 00:04:07 2007 +0100

    Re: [perl #41442] segfault (dead loop) with Encoding, use open :locale, print STDERR
    Message-ID: <87veiggt2g.fsf@biokovo.herceg.de>

    p4raw-id: //depot/perl@30213

:100644 100644 760c921584ee6ced54e6f51ea2657881178689d3 41874528b76a354ab83c6c332b6e317e60f0fe16 M      MANIFEST
:040000 040000 fca5fa13398978ebf037e2770ed4dea2ca10f705 2d1b3562c74933e1446f1b09bcc10cedad48bc55 M      ext
bisect run success
That took 1970 seconds

Seems that 41442 and 29437 are duplicates.

I guess that if there is something to learn here, it's that once 29437 was
diagnosed a bit better, the title of it should have been changed to reflect
the cause. Which would have made the title closer to that of 41442's title.

Nicholas Clark



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