develooper Front page | perl.perl5.porters | Postings from June 2007

[perl #43214] "warn" causes segmentation fault in Encode

Thread Previous
From:
Steve Peters via RT
Date:
June 29, 2007 09:05
Subject:
[perl #43214] "warn" causes segmentation fault in Encode
Message ID:
rt-3.6.HEAD-1276-1183133141-478.43214-15-0@perl.org
On Thu Jun 14 03:57:22 2007, vincent <!-- x --> at vinc17.org wrote:
> 
> This is a bug report for perl from vincent <!-- x --> at vinc17.org,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> The following script causes a segmentation fault:
> 
> #!/usr/bin/env perl
> 
> use strict;
> use I18N::Langinfo qw(langinfo CODESET);
> 
> my $encoding = langinfo CODESET;
> print "Encoding: $encoding\n";
> 
> my $agrave = chr(0xe0);
> my $str = "A grave = '$agrave'";
> print "Test 1\n";
> print STDERR "   print: $str\n";
> print "Test 2\n";
> warn "    warn: $str\n";
> binmode STDERR, ":encoding($encoding)";
> print "Test 3\n";
> print STDERR "   print: $str\n";
> print "Test 4\n";
> warn "    warn: $str\n";
> 
> $ ./warntest
> Encoding: ISO-8859-1
> Test 1
>    print: A grave = 'à'
> Test 2
>     warn: A grave = 'à'
> Test 3
>    print: A grave = 'à'
> Test 4
> zsh: segmentation fault (core dumped)  ./warntest
> 
> The backtrace:
> 
> (gdb) bt
> #0  0xb7e6effc in _int_malloc () from /lib/i686/cmov/libc.so.6
> #1  0xb7e70d0e in malloc () from /lib/i686/cmov/libc.so.6
> #2  0x080ac83f in Perl_safesysmalloc ()
> #3  0x080cae8c in Perl_sv_grow ()
> #4  0x080cafa3 in Perl_newSV ()
> #5  0xb7ba6fd3 in ?? () from /usr/lib/perl/5.8/auto/Encode/Encode.so
> #6  0x0814e008 in ?? ()
> #7  0x00000401 in ?? ()
> #8  0x00000000 in ?? ()
> 
> There seems to be something wrong with the backtrace. With 5.8.7,
> there was an infinite recursion, as shown by:
> 
>   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343831
> 

I can't reproduce this problem, but I also don't know what version of
Encode you're using.  Please reply to this email with the output from...

    perl -MEncode -wle'print $Encode::VERSION'

Thanks!

Thread Previous


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