develooper Front page | perl.perl5.porters | Postings from July 2000

[ID 20000730.003] utf8::length() bad

Thread Next
Jeffrey Friedl
July 31, 2000 11:14
[ID 20000730.003] utf8::length() bad
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]


   % perl -mutf8 -e "print utf8::length('a')"

causes my cpu to peg, and memory to grow until I break out of it.

I tried running it in gdb, got a segfault report immediately, but the
thing kept running (and sucking memory) until I broke out of it:

    (gdb) run -mutf8 -e "print utf8::length('a')"
    Starting program: /usr/src/perl-5.6.0/perl -mutf8 -e "print utf8::length('a')"
    Segmentation fault (core dumped)

--- several seconds pass, then I interrupt it ---

    Program received signal SIGINT, Interrupt.
    0x8091349 in Perl_hv_fetch (hv=0x80f08e0, key=0xbffff0e4 "utf8::", klen=6, 
	lval=1) at hv.c:181
    181         PERL_HASH(hash, key, klen);
    (gdb) where
    #0  0x8091349 in Perl_hv_fetch (hv=0x80f08e0, key=0xbffff0e4 "utf8::", klen=6, 
	lval=1) at hv.c:181
    #1  0x805fe73 in Perl_gv_fetchpv (nambeg=0x80fcb10 "utf8::length", add=1, 
	sv_type=12) at gv.c:550
    #2  0x80a11e3 in Perl_sv_2cv (sv=0x80fb010, st=0xbffff224, gvp=0xbffff228, 
	lref=1) at sv.c:4981
    #3  0x80a3fde in Perl_pp_rv2cv () at pp.c:379
    #4  0x80949ed in Perl_runops_standard () at run.c:27
    #5  0x805bd4e in S_run_body (oldscope=1) at perl.c:1401
    #6  0x805bad8 in perl_run (my_perl=0x80f0858) at perl.c:1325
    #7  0x8059903 in main (argc=4, argv=0xbffff354, env=0xbffff368)
	at perlmain.c:52

Even though I have my coredumplimit set to zero, when running this from
within gdb, it does dump a small (360k) core file. On a whim, I ran

    jfriedl@fummy> gdb /usr/src/perl-5.6.0/perl core
    GNU gdb 4.18
    Copyright 1998 Free Software Foundation, Inc.
    This GDB was configured as "i386-mandrake-linux"...

    warning: core file may not match specified executable file.
    Core was generated by `perl -w test -d /etc/profile.d'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/
    Reading symbols from /lib/
    Reading symbols from /usr/lib/
    Reading symbols from /lib/
    Reading symbols from /lib/
    Reading symbols from /lib/
    Reading symbols from /lib/
    Reading symbols from /lib/
    #0  0x400fd1f4 in memmove () from /lib/
    (gdb) where
    #0  0x400fd1f4 in memmove () from /lib/
    #1  0x80faf7c in ?? ()
    Cannot access memory at address 0x1.

Which seems odd, to say the least.


[Please do not change anything below this line]
Site configuration information for perl v5.6.0:

Configured by jfriedl at Sat Jul 29 20:09:33 PDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.15, archname=i686-linux
    uname='linux 2.2.16 #6 smp sun jul 23 11:26:16 pdt 2000 i686 unknown '
    config_args='-ds -e -A optimize=-g'
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
    cc='cc', optimize='-O2 -g', gccversion=pgcc-2.91.66 19990314 (egcs-1.1.2 release)
    cppflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.6.0:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About