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

[ID 20010703.006] coredump during Carp on perl 5.6.0 on Linux

Thread Next
From:
Bruce Barnett
Date:
July 3, 2001 05:41
Subject:
[ID 20010703.006] coredump during Carp on perl 5.6.0 on Linux
Message ID:
200107031146.f63BkSA17604@grymoire.com

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


-----------------------------------------------------------------
[Please enter your report here]


I was debugging some modifications to Majordomo's "digest" program and
perl 5.6.0 coredumped.  TSince the code was vanila, I felt this was important to report.

The code is reproducable, but currently you need majordomo
etc. installed.  The section that triggered the coredump was
simple. It is responsible for removing signature lines at the end of
mail messages. I just started debugging this code, and started with
some sed(1) code I pasted into perl. So I expected some of these
regular expressions may be incorrect. I have about a hundred of these
rules, and the make_digest was reading the 11th file when this
happened.


---
The code I was debugging looked like this:

	    $body =~ s/^.*http:..www.netzero.net.download.index.html$//;
	    $body =~ s/^===========================================================================//;
	    $body =~ s/^Bid and sell for free at http:..auctions.yahoo.com.*$//i;
	    $body =~ s/^Click here for FREE Internet Access and Email.*$//i;
	    $body =~ s/^Corporation or subsidiary companies, which may be confidential,.*$//i;
	    $body =~ s/^DO YOU YAHOO!.*$//i;
	# Many more lines like this deleted......

                 I was debugging this, and here is the trace:
	Hopefuly this is enough to give a clue..

  DB<4> s
main::send_digest(ndigest:340):		    $body =~ s/^Click here for FREE Internet Access and Email.*$//i;
  DB<5> s
main::send_digest(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:	    { local $@; require Carp::Heavy; }	# XXX fix require to not clear $@?
  DB<5> s
main::send_digest(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:	    { local $@; require Carp::Heavy; }	# XXX fix require to not clear $@?
  DB<5> s
main::send_digest(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:	    { local $@; require Carp::Heavy; }	# XXX fix require to not clear $@?
  DB<5> s
main::send_digest(/usr/local/lib/perl5/5.6.0/Carp.pm:98):
98:	    goto &longmess_heavy;
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:30):
30:	    return @_ if ref $_[0];
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:31):
31:	    my $error = join '', @_;
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:32):
32:	    my $mess = "";
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:33):
33:	    my $i = 1 + $CarpLevel;
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:34):
34:	    my ($pack,$file,$line,$sub,$hargs,$eval,$require);
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:35):
35:	    my (@a);
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:	    while (do { { package DB; @a = caller($i++) } } ) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:	    while (do { { package DB; @a = caller($i++) } } ) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:41):
41:		($pack,$file,$line,$sub,$hargs,undef,$eval,$require) = @a;
  DB<7> p @a
mainndigest47main::make_digest00
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:56):
56:		if ($error =~ m/\n$/) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:61):
61:		    if (defined $eval) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:77):
77:		    if ($hargs) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:111):
111:		    $mess .= "\t$sub " if $error eq "called";
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:112):
112:		    $mess .= "$error at $file line $line";
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:113):
113:		    if (defined &Thread::tid) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:117):
117:		    $mess .= "\n";
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:122):
122:		$error = "called";
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:	    while (do { { package DB; @a = caller($i++) } } ) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:	    while (do { { package DB; @a = caller($i++) } } ) {
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:125):
125:	    my $msg = \($mess || $error);
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:126):
126:	    $$msg =~ tr/\0//d;
  DB<5> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:127):
127:	    $$msg;
  DB<8> p $msg
SCALAR(0x82f8184)
  DB<5> s
Signal SEGV at ndigest line 47
Abort (core dumped)

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=critical
---
Site configuration information for perl v5.6.0:

Configured by barnett at Wed Apr 26 07:24:06 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.0.36, archname=i586-linux
    uname='linux grymoire.com 2.0.36 #1 tue nov 17 13:01:19 est 1998 i586 unknown '
    config_args=''
    hint=recommended, 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
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.7.2.3
    cppflags='-I/usr/local/include'
    ccflags ='-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=4
    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/libc-2.0.7.so, 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:
    /usr/local/lib/perl5/5.6.0/i586-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/i586-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/home/users/barnett
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/users/barnett/bin:/home/users/barnett/bin/2.2.16-3/i586/Linux:/local/bin:/local/bin/Linux:/usr/local/bin:/usr/local/sbin:/local/magic/bin:/usr/X11R6/bin:/usr/X11/bin:/usr/openwin/bin:/usr/sbin:/usr/bin:/bin:/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About