Date: Wed, 20 Jul 2005 09:52:48 +0400 (MSD) From: pavel@ctk.ru To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/83767: Perl5.8.7 coredumps on Text::ParseWords::quotewords with 'Bus error' message Message-ID: <20050720055248.E397413689F@zeus.nordnet.ru> Resent-Message-ID: <200507200600.j6K60Ye7045921@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 83767 >Category: ports >Synopsis: Perl5.8.7 coredumps on Text::ParseWords::quotewords with 'Bus error' message >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 20 06:00:33 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Pavel A Crasotin >Release: FreeBSD 5.4-STABLE i386 >Organization: OJSC SeverTransCom >Environment: System: FreeBSD zeus.nordnet.ru 5.4-STABLE FreeBSD 5.4-STABLE #0: Tue Jul 19 15:47:44 MSD 2005 root@zeus.nordnet.ru:/usr/obj/usr/src/sys/ZEUS i386 >Description: Perl5.8.7 was installed from ports. The perl-after-upgrade script with -f option was run. Here is perl -V: # perl -V Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=freebsd, osvers=5.4-stable, archname=i386-freebsd-64int uname='freebsd zeus.nordnet.ru 5.4-stable freebsd 5.4-stable #1: sat may 14 12:26:53 msd 2005 root@zeus.nordnet.ru:usrobjusrsrcsyszeus i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.7/mach -Dprivlib=/usr/local/lib/perl5/5.8.7 -Dman3dir=/usr/local/lib/perl5/5.8.7/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.7/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.7 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.8.7/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -Doptimize=-O -pipe -march=pentiumpro -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O -pipe -march=pentiumpro', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.7/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.4.2 [FreeBSD] 20040728', 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 ='-pthread -Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lm -lcrypt -lutil perllibs=-lm -lcrypt -lutil libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.8.7/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_64_BIT_INT USE_LARGE_FILES Locally applied patches: defined-or Built under freebsd Compiled at Jul 19 2005 10:23:40 @INC: /usr/local/lib/perl5/site_perl/5.8.7/mach /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.7/BSDPAN /usr/local/lib/perl5/5.8.7/mach /usr/local/lib/perl5/5.8.7 . But it breaks normal work of Cricket 1.0.5. After little investigation I found out the problem is in Text::ParseWords::quotewords procedure. The call of this procedure makes perl to dump core. The test script reproducing the problem is attached below. This script works fine on perl 5.8.6: # perl -V Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=freebsd, osvers=5.4-release, archname=i386-freebsd-64int uname='freebsd freebsd.org 5.4-release freebsd 5.4-release #0: sun apr 3 15:13:31 pdt 2005 kris@freebsd.org:usrsrcsysmagickernelpath i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.6/mach -Dprivlib=/usr/local/lib/perl5/5.8.6 -Dman3dir=/usr/local/lib/perl5/5.8.6/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.6/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.6 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.8.6/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O -pipe -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O -pipe ', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.6/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.4.2 [FreeBSD] 20040728', 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 =' -Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lm -lcrypt -lutil perllibs=-lm -lcrypt -lutil libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.8.6/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_64_BIT_INT USE_LARGE_FILES Locally applied patches: SUIDPERLIO0 - fix PERLIO_DEBUG local root exploit (CAN-2005-0155) SUIDPERLIO1 - fix PERLIO_DEBUG buffer overflow (CAN-2005-0156) Built under freebsd Compiled at Apr 3 2005 22:17:29 @INC: /usr/local/lib/perl5/site_perl/5.8.6/mach /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.6/BSDPAN /usr/local/lib/perl5/5.8.6/mach /usr/local/lib/perl5/5.8.6 . >How-To-Repeat: Run the attached script on FreeBSD 5.4-STABLE i386 box with perl5.8.7 installed >Fix: --- test_quotewords.pl begins here --- #!/usr/bin/perl use strict; use Text::ParseWords; my $test_string = <<EOT; target all targets = "/routers/links/n41-r1-fastethernet0-1-806-802-1q; /routers/links/n41-r1-fastethernet0-1-918-802-1q; /routers/links/n41-r1-fastethernet0-1-804-802-1q; /routers/links/n41-r1-fastethernet0-1-616-802-1q; /routers/links/n41-r1-fastethernet0-1-704-802-1q; /routers/links/n41-r1-fastethernet0-1-916-802-1q; /routers/links/n41-r1-fastethernet0-1-439-802-1q; /routers/links/n41-r1-fastethernet0-1-919-802-1q; /routers/links/n41-r1-fastethernet0-1-801-802-1q; /routers/links/n41-r1-fastethernet0-1-802-802-1q; /routers/links/n41-r1-fastethernet0-1-444-802-1q; /routers/links/n41-r1-fastethernet0-1-914-802-1q; /routers/links/n41-r1-fastethernet0-1-810-802-1q; /routers/links/n41-r1-fastethernet0-1-435-802-1q; /routers/links/n41-r1-fastethernet0-1-622-802-1q; /routers/links/n41-r1-fastethernet0-1-807-802-1q; /routers/links/n41-r1-fastethernet0-1-422-802-1q; /routers/links/n41-r1-fastethernet0-1-915-802-1q; /routers/links/n41-r1-fastethernet0-1-412-802-1q; /routers/links/n41-r1-fastethernet0-1-419-802-1q; /routers/links/n41-r1-fastethernet0-1-437-802-1q; /routers/links/n41-r1-fastethernet0-1-424-802-1q; /routers/links/n41-r1-fastethernet0-1-415-802-1q; /routers/links/n41-r1-fastethernet0-1-808-802-1q; /routers/links/n41-r1-fastethernet0-1-905-802-1q; /routers/links/n41-r1-fastethernet0-1-427-802-1q; /routers/links/n41-r1-fastethernet0-1-432-802-1q; /routers/links/n41-r1-fastethernet0-1-902-802-1q; /routers/links/n41-r1-fastethernet0-1-911-802-1q; /routers/links/n41-r1-fastethernet0-1-420-802-1q; /routers/links/n41-r1-fastethernet0-1-805-802-1q; /routers/links/n41-r1-fastethernet0-1-619-802-1q; /routers/links/n41-r1-fastethernet0-1-442-802-1q; /routers/links/n41-r1-fastethernet0-1-410-802-1q; /routers/links/n41-r1-fastethernet0-1-809-802-1q; /routers/links/n41-r1-fastethernet0-1-917-802-1q; /routers/links/n41-r1-fastethernet0-1-912-802-1q; /routers/links/n41-r1-fastethernet0-1-441-802-1q; /routers/links/n41-r1-fastethernet0-1-706-802-1q; /routers/links/n41-r1-fastethernet0-1-617-802-1q; /routers/links/n41-r1-fastethernet0-1-909-802-1q; /routers/links/n41-r1-fastethernet0-1-703-802-1q; /routers/links/n41-r1-fastethernet0-1-621-802-1q; /routers/links/n41-r1-fastethernet0-1-431-802-1q; /routers/links/n41-r1-fastethernet0-1-906-802-1q; /routers/links/n41-r1-fastethernet0-1-901-802-1q; /routers/links/n41-r1-fastethernet0-1-624-802-1q; /routers/links/n41-r1-fastethernet0-1-614-802-1q; /routers/links/n41-r1-fastethernet0-1-701-802-1q; /routers/links/n41-r1-fastethernet0-1-440-802-1q; /routers/links/n41-r1-fastethernet0-1-623-802-1q; /routers/links/n41-r1-fastethernet0-1-438-802-1q; /routers/links/n41-r1-fastethernet0-1-702-802-1q; /routers/links/n41-r1-fastethernet0-1-907-802-1q; /routers/links/n41-r1-fastethernet0-1-620-802-1q; /routers/links/n41-r1-fastethernet0-1-612-802-1q; /routers/links/n41-r1-fastethernet0-1-413-802-1q; /routers/links/n41-r1-fastethernet0-1-625-802-1q; /routers/links/n41-r1-fastethernet0-1-908-802-1q; /routers/links/n41-r1-fastethernet0-1-904-802-1q; /routers/links/n41-r1-fastethernet0-1-417-802-1q; /routers/links/n41-r1-fastethernet0-1-615-802-1q; /routers/links/n41-r1-fastethernet0-1-618-802-1q; /routers/links/n41-r1-fastethernet0-1-423-802-1q; /routers/links/n41-r1-fastethernet0-1-705-802-1q; /routers/links/n41-r1-fastethernet0-1-421-802-1q; /routers/links/n41-r1-fastethernet0-1-443-802-1q; /routers/links/n41-r1-fastethernet0-1-913-802-1q; /routers/links/n41-r1-fastethernet0-1-910-802-1q; /routers/links/n41-r1-fastethernet0-1-436-802-1q" EOT my @words = (); @words = quotewords('[\s=]+', 0, $test_string); print join(',',@words),"\n"; --- test_quotewords.pl ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050720055248.E397413689F>