Skip Menu |

This queue is for tickets about the Filter-Handle CPAN distribution.

Report information
The Basics
Id: 1485
Status: open
Priority: 0/
Queue: Filter-Handle

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
Cc: imacat [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Filter::Handle .03 segfaults in "make test" on FreeBSD 4.5
Here's the output of "make test" for Filter::Handle .03 on FreeBSD 4.5: PERL_DL_NONLAZY=1 /usr/local/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl 1..5 ok 1 ok 2 Segmentation fault - core dumped *** Error code 139 And here's my perl details for that machine: ummary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=freebsd, osvers=4.5-release, archname=i386-freebsd uname='freebsd asana.summersault.com 4.5-release freebsd 4.5-release #1: sat apr 27 11:05:00 est 2002 mark@asana.dhis.org:usrobjusrsrcsysasana-20020427 i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.0/mach -Dprivlib=/usr/local/lib/perl5/5.8.0 -Dman3dir=/usr/local/lib/perl5/5.8.0/man/man3 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Ui_gdbm -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN"' 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=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include', optimize='-O -pipe ', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.3 20010315 (release) [FreeBSD]', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 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, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -lm -lc -lcrypt -lutil perllibs=-lm -lc -lcrypt -lutil libc=, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' ######### This appears to be same behavior reported through CPAN testers with Solaris 2.8. Thanks. -mark
From: TIMA [...] cpan.org
The attached file is a patch that fixes the segfaults issues that is occurring when run with Perl 5.8+. All tests are passing on 5.6.1 and 5.8.6.
5c5 < $VERSION = '0.03'; --- > $VERSION = '0.04'; 41,42c41,47 < my $fh = *{ $self->{fh} }; < print $fh $self->{output}->(@_); --- > if ($] < 5.008) { > my $fh = *{ $self->{fh} }; > print $fh $self->{output}->(@_); > } else { > open FH, ">&", \*{ $self->{fh} }; > print FH $self->{output}->(@_); > }
Subject: Segmentation Fault, Too, and Use up All Memory on Linux 2.6
I experienced the same segmentation fault with Linux 2.6, too. It seems to use up all the memory in a very short time, and die. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 17673 imacat 18 0 1664m 1.6g 1520 D 38 81.7 0:07.66 perl My environment is Perl 5.8.8 and Perl 5.10.0, Linux 2.6, x86_64. I attached the terminal log below. Please tell me if you need any more information, or if I could be of any help. Thank you. ============= imacat@rinse tmp/Filter-Handle-0.03 % perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi-ld Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. imacat@rinse tmp/Filter-Handle-0.03 % perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Filter::Handle imacat@rinse tmp/Filter-Handle-0.03 % make cp Handle.pm blib/lib/Filter/Handle.pm Manifying blib/man3/Filter::Handle.3 imacat@rinse tmp/Filter-Handle-0.03 % make test 1..5 ok 1 ok 2 make: *** [test_dynamic] Interrupt imacat@rinse tmp/Filter-Handle-0.03 % perl -Iblib/lib -Iblib/arch test.pl 1..5 ok 1 ok 2 zsh: segmentation fault perl -Iblib/lib -Iblib/arch test.pl imacat@rinse tmp/Filter-Handle-0.03 % ============= imacat@rinse tmp/Filter-Handle-0.03 % /opt/perl/testers/5.10.0/bin/perl -v This is perl, v5.10.0 built for x86_64-linux-thread-multi-ld Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. imacat@rinse tmp/Filter-Handle-0.03 % /opt/perl/testers/5.10.0/bin/perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Filter::Handle imacat@rinse tmp/Filter-Handle-0.03 % make cp Handle.pm blib/lib/Filter/Handle.pm Manifying blib/man3/Filter::Handle.3 imacat@rinse tmp/Filter-Handle-0.03 % make test 1..5 ok 1 ok 2 make: *** [test_dynamic] Interrupt imacat@rinse tmp/Filter-Handle-0.03 % /opt/perl/testers/5.10.0/bin/perl -Iblib/lib -Iblib/arch test.pl 1..5 ok 1 ok 2 zsh: segmentation fault /opt/perl/testers/5.10.0/bin/perl -Iblib/lib -Iblib/arch test.pl imacat@rinse tmp/Filter-Handle-0.03 % =============
Subject: Infinitely Recursive Calls to PRINT at Filter.pm
Dear Benjamin Trott, Hi. This is imacat from Taiwan. I have further investigated your Filter-Handle-0.03. At the test 3 of your test.pl, it enters an infinite loop, recursively calling the PRINT method. When the calling stack overflows, it dies with a segmentation fault. I do not know what to do. Maybe you want to have "&{$self->{output}}(@_)" instead of "print $fh $self->{output}->(@_)". But I am not sure. Please take some time on this issue. Thank you.