Front page | perl.perl5.porters |
Postings from December 2008
[perl #61520] Segfault in debugger with tr// and UTF8
Thread Next
From:
Clinton Gormley
Date:
December 19, 2008 08:16
Subject:
[perl #61520] Segfault in debugger with tr// and UTF8
Message ID:
rt-3.6.HEAD-15883-1229694470-1283.61520-75-0@perl.org
# New Ticket Created by Clinton Gormley
# Please include the string: [perl #61520]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61520 >
This is a bug report for perl from clint@traveljury.com,
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:
tr[aAbB\x{142}][]cd;
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]
-----------------------------------------------------------------
---
Flags:
category=library
severity=medium
---
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:
Platform:
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
-Accflags=-DPERL_USE_SAFE_PUTENV'
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
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV
-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',
lseeksize=8
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/libc-2.8.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.8'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64'
Locally applied patches:
---
@INC for perl 5.10.0:
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0
/usr/lib/perl5/vendor_perl
.
---
Environment for perl 5.10.0:
HOME=/root
LANG=en_GB.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/clinton/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #61520] Segfault in debugger with tr// and UTF8
by Clinton Gormley