Skip Menu |

This queue is for tickets about the HTML-Parser CPAN distribution.

Report information
The Basics
Id: 7783
Status: resolved
Priority: 0/
Queue: HTML-Parser

People
Owner: Nobody in particular
Requestors: william [...] knowmad.com
Cc:
AdminCc:

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

Attachments


Subject: Error - Attempt to free unreferenced scalar
Gisle, I've discovered a problem with the latest release of HTML::Parser under FreeBSD 4.7 and Perl 5.6.1. Basically the module no longer works with the following output (based on the attached script): Attempt to free unreferenced scalar at ./html-parser.cgi line 66. Downgrading to 3.35 works fine. I've included the output from perl -V at the end of this message. The attached test script works fine under Linux. Let me know if you need further information to track down the error. Thanks, William ---------------------------- Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=freebsd, osvers=4.7-release-p10, archname=i386-freebsd uname='freebsd crickhollow.shire.net 4.7-release-p10 freebsd 4.7-release-p10 #3: thu jul 3 23:58:40 mdt 2003 chad@crickhollow.shire.net:space2objbackupsusr-srcsyscrickhollow-mp i386 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.6.1/mach -Dprivlib=/usr/local/lib/perl5/5.6.1 -Dman3dir=/usr/local/lib/perl5/5.6.1/man/man3 -Dsitearch=/usr/local/lib/perl5/site_perl/5.6.1/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.6.1 -Dscriptdir=/usr/local/bin -Dcc=cc -Ui_malloc -Ui_iconv -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.6.1/BSDPAN" -Ui_gdbm -Dusemymalloc=n' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.6.1/BSDPAN" -fno-strict-aliasing -I/usr/local/include', optimize='-O -pipe ', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.6.1/BSDPAN" -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.4 20020320 [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, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lm -lc -lcrypt -lutil perllibs=-lm -lc -lcrypt -lutil libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under freebsd Compiled at Mar 17 2004 11:38:41 %ENV: PERL5LIB="/web/adcmw/perl/lib/perl5:/web/adcmw/perl/lib/perl5/site_perl" @INC: /web/adcmw/perl/lib/perl5 /web/adcmw/perl/lib/perl5/site_perl /usr/local/lib/perl5/site_perl/5.6.1/mach /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.1/BSDPAN /usr/local/lib/perl5/5.6.1/mach /usr/local/lib/perl5/5.6.1 .
Download html-parser.cgi
application/x-cgi 923b

Message body not shown because it is not plain text.

I can't see anything in the diff between 3.35 and 3.36 that could explain this. Please try to trim down your test script to be as minimal as possible. Is 'use CGI' needed to trigger this bug? Is $p->attr_encoded(1) needed? Show quoted text
> Attempt to free unreferenced scalar at ./html-parser.cgi line 66.
The attached script only had 45 lines. How come it fails at line 66 then?
[GAAS - Mon Nov 8 06:27:41 2004]: Show quoted text
> I can't see anything in the diff between 3.35 and 3.36 that could > explain this. Please try to trim down your test script to be as > minimal as possible. Is 'use CGI' needed to trigger this bug? > Is $p->attr_encoded(1) needed?
Indeed, the reason for the error was due to using a different version of Perl (5.005_03) than I had thought I was using (5.6.1). Once I fixed my path in the shebang line, all was fine. Sorry for the false alarm. It may be useful to add a 'use 5.6;' line to avoid future reports Show quoted text
> > Attempt to free unreferenced scalar at ./html-parser.cgi line
> 66. > > The attached script only had 45 lines. How come it fails at line 66 > then?
Sorry about that. I did some cleanup on the script between my test and posting it here. The line number should have been 44. William
[guest - Mon Nov 8 15:38:23 2004]: Show quoted text
> It may be useful to add a 'use 5.6;' line to avoid future reports
I'm not sure I follow. Where would I put this line?
[GAAS - Mon Nov 8 16:36:36 2004]: Show quoted text
> [guest - Mon Nov 8 15:38:23 2004]: >
> > It may be useful to add a 'use 5.6;' line to avoid future reports
> > I'm not sure I follow. Where would I put this line?
I suppose in HTML::Parser. In reading more about this pragma ('perldoc -f use'), I learned that the line should be as follows for better backward compatibility: use perl 5.006_001; I have not used this pragma before so cannot give much further input. HTH, William
[guest - Mon Nov 8 19:53:09 2004]: Show quoted text
> use perl 5.006_001;
Oops, that should be: use 5.006_001; See, I told you I haven't used it much :). William