FAQ
# New Ticket Created by hmbrand@cpan.org
# Please include the string: [perl #62666]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=62666 >



This is a bug report for perl from hmbrand@cpan.org,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
[Please enter your report here]

--8<--- demo.pl
use strict;
use warnings;
#use Data::Peek;

my $v = "\x{20ac} 12,345.00";
#print DPeek ($v), "\n";
my $x = sprintf "%12.12s|", $v;
-->8---

with Data::Peek for debugging:

PV("\342\202\254 12,345.00"\0) [UTF8 "\x{20ac} 12,345.00"]
panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at demo.pl line 9.

without:

panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at demo.pl line 9.

Which is a crash.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.10.0:

Configured by merijn at Tue Dec 18 13:34:32 CET 2007.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.22.13-0.3-default, archname=i686-linux-64int
uname='linux nb09 2.6.22.13-0.3-default #1 smp 20071119 15:02:58 utc i686 i686 i386 gnulinux '
config_args='-Duse64bitint -des'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-fno-strict-aliasing -pipe -I/pro/local/include'
ccversion='', gccversion='4.2.1 (SUSE Linux)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-L/pro/local/lib'
libpth=/pro/local/lib /lib /usr/lib /usr/local/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.6.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.6.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/pro/local/lib'

Locally applied patches:


---
@INC for perl 5.10.0:
/pro/lib/perl5/5.10.0/i686-linux-64int
/pro/lib/perl5/5.10.0
/pro/lib/perl5/site_perl/5.10.0/i686-linux-64int
/pro/lib/perl5/site_perl/5.10.0
.

---
Environment for perl 5.10.0:
HOME=/home/merijn
LANG=en_US.UTF8
LANGUAGE (unset)
LOGDIR (unset)
PERL_BADLANG (unset)
SHELL=/bin/tcsh

Search Discussions

  • Bram via RT at May 29, 2009 at 7:53 pm

    On Fri Jan 23 12:14:54 2009, hmbrand@cpan.org wrote:

    --8<--- demo.pl
    use strict;
    use warnings;
    #use Data::Peek;

    my $v = "\x{20ac} 12,345.00";
    #print DPeek ($v), "\n";
    my $x = sprintf "%12.12s|", $v;
    -->8---

    with Data::Peek for debugging:

    PV("\342\202\254 12,345.00"\0) [UTF8 "\x{20ac} 12,345.00"]
    panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at
    demo.pl line 9.

    without:

    panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at
    demo.pl line 9.

    Which is a crash.

    [Please do not change anything below this line]
    -----------------------------------------------------------------
    Binary search:

    ----Program----
    use strict;
    use warnings;
    #use Data::Peek;

    my $v = "\x{20ac} 12,345.00";
    #print DPeek ($v), "\n";
    my $x = sprintf "%12.12s|", $v;

    ----Output of .../p0IhoGv/perl-5.9.4@31245/bin/perl----

    ----EOF ($?='0')----
    ----Output of .../proQMr6/perl-5.9.4@31246/bin/perl----
    panic: utf8_mg_pos_cache_update cache 12 real 11 for ⬠12,345.00 at /
    tmp/rt-62666.pl line 7.

    ----EOF ($?='65280')----
    Need a perl between 31245 and 31246



    http://public.activestate.com/cgi-bin/perlbrowse/p/31246
    Change 31246 by davem@davem-pigeon on 2007/05/20 23:56:30

    delete unused vars PL_av_fetch_sv, PL_hv_fetch_sv
    and fix 'duplicate symbol' warnings from embed.pl
    for utf8cache and sh_path



    The only other difference I can find is that SvLEN is 14 on perl-5.8.7
    and SvLEN is 16 on perl-5.8.8 but this looks like an intended and
    unrelated change (Change 24665)...


    Best regards,

    Bram
  • Alex Vandiver at May 29, 2009 at 8:57 pm

    At Fri Jan 23 15:14:55 -0500 2009, hmbrand@cpan.org (via RT) wrote:
    panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at demo.pl
    line 9.
    Attached is a fix for this. Unfortunately, I don't think we can get
    away without the added call to svn_len_utf8 without rewriting
    sv_pos_u2b_cached.

    Thanks to Best Practical for volunteering my time to look at some of
    these 5.10.1 blockers.
    - Alex
    --
    Networking -- only one letter away from not working
  • Rafael Garcia-Suarez at May 30, 2009 at 2:19 pm

    2009/5/29 Alex Vandiver <alex@chmrr.net>:
    At Fri Jan 23 15:14:55 -0500 2009, hmbrand@cpan.org (via RT) wrote:
    panic: utf8_mg_pos_cache_update cache 12 real 11 for ? 12,345.00 at demo.pl
    line 9.
    Attached is a fix for this.  Unfortunately, I don't think we can get
    away without the added call to svn_len_utf8 without rewriting
    sv_pos_u2b_cached.
    Thanks, applied as 9ef5ed94af316c852dd085d2cbe8306867ac870b.
    Do you patch against maint-5.10 ? I apply patches to blead, Dave will
    then cherry-pick them to maint; which is why it's better to patch
    directly against blead, usually. (of course this advice doesn't apply
    to maint-only bugs)
    Thanks to Best Practical for volunteering my time to look at some of
    these 5.10.1 blockers.
    Thanks indeed !

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJan 23, '09 at 8:15p
activeMay 30, '09 at 2:19p
posts4
users3
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase