develooper Front page | perl.perl5.porters | Postings from December 2008

[perl #61520] Segfault in debugger with tr// and UTF8

Thread Next
Clinton Gormley
December 19, 2008 08:16
[perl #61520] Segfault in debugger with tr// and UTF8
Message ID:
# New Ticket Created by  Clinton Gormley 
# Please include the string:  [perl #61520]
# in the subject line of all future correspondence about this issue. 
# <URL: >

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

I have code which runs in Perl 5.10 without the debugger, but
segfaults with the debugger.

The offending line appears to be:


But only when it is invoked by string eval'ed code, or via 
an anonymous sub.

I will upload a script which demonstrates the bug. Normally, under
the debugger, I get a segfault, However, in the last example (using
*symbol = sub {   }), I get this error instead:

   Assertion ((svtype)((hv)->sv_flags & 0xff)) == SVt_PVHV failed: file
"hv.c", line 343

Also, I managed to trigger the following error:

  panic: swash_fetch got swatch of unexpected bit width

Unfortunately, I can't recreate the combination of code I had when that
error occurred, but it was thrown on the above-mention tr[] statement.

The attached code works fine under the debugger in 5.8.8 (32 bit)
The code itself was generated by the Sort::ArbBiLex module

[Please do not change anything below this line]
This perlbug was built using Perl 5.10.0 - Tue Jul 15 14:37:49 UTC 2008
It is being executed now by  Perl 5.10.0 - Tue Jul 15 14:31:57 UTC 2008.

Site configuration information for perl 5.10.0:

Configured by abuild at Tue Jul 15 14:31:57 UTC 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
    osname=linux, osvers=2.6.25, archname=x86_64-linux-thread-multi
    uname='linux stravinsky 2.6.25 #1 smp 20080210 20:01:04 utc x86_64
x86_64 x86_64 gnulinux '
    config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm
-Duseshrplib=true -Doptimize=-O2 -fmessage-length=0 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -g -Wall -pipe
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
    optimize='-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -g -Wall -pipe',
-DDEBUGGING -fno-strict-aliasing -pipe'
    ccversion='', gccversion='4.3.1 20080507 (prerelease)
[gcc-4_3-branch revision 135036]', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib64'
    libpth=/lib64 /usr/lib64 /usr/local/lib64
    libs=-lm -ldl -lcrypt -lpthread
    perllibs=-lm -ldl -lcrypt -lpthread
    libc=/lib64/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64'

Locally applied patches:

@INC for perl 5.10.0:

Environment for perl 5.10.0:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (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