[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-porters
Subject:    Re: [perl #28075] Perl-5.8.2 NDBM_File creates DB with Perl code inserts
From:       Tim Bunce <Tim.Bunce () pobox ! com>
Date:       2004-03-31 17:42:55
Message-ID: 20040331174255.GA16309 () dansat ! data-plan ! com
[Download RAW message or body]

On Wed, Mar 31, 2004 at 11:53:38AM -0500, Andrew Dougherty wrote:
> On Tue, 30 Mar 2004, Supraexpress@Globaleyes.Net wrote:
> 
> > Using perl-5.8.2 NDBM_File, a new DB entry causes the DB file
> > to be filled with "Perl code fragments".
> 
> I can't reproduce this problem under either Solaris or Linux/SPARC
> (perl-5.8.3 for both, though I'm unsure if that'd be relevant.)
> Thanks for the good sample script.
> 
> > ====== Sample script used =====
> > #!/usr/bin/perl
> > use NDBM_File;
> 
> Ok, here you're asking for NDBM_File.
> 
> > strings newspwfile.db
> 
> But traditional NDBM_File uses *two* files, newspwfile.dir and
> newspwfile.pag.  Since you got 'newspwfile.db' instead, I'm wondering if
> the NDBM_File interface is being emulated by another package.

On some platforms, including FreeBSD, NDBM is BerkeleyDB.

Tim.

> In my case, I do get a file with a ton of nulls in it.  I wonder if
> whatever library you're using to supply the underlying NDBM_File support
> is properly zeroing memory.
> 
> First step here is probably to figure out where the NDBM_File support is
> coming from.
> 
> > -----------------------------------------------------------------
> > ---
> > Flags:
> > category=core
> > severity=medium
> > ---
> > Site configuration information for perl v5.8.2:
> > 
> > Configured by genuser at Sat Mar 27 16:44:42 CST 2004.
> > 
> > Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
> > Platform:
> > osname=freebsd, osvers=4.9-release, archname=i386-freebsd
> > uname='freebsd localhostl 4.9-release freebsd 4.9-release #0: mon jan 19 13:47:35 \
> > cst 2004 genuser@localhost:usrsrcsyscompilexsystem i386 ' config_args='-sde \
> > -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.2/mach \
> > -Dprivlib=/usr/local/lib/perl5/5.8.2 \
> > -Dman3dir=/usr/local/lib/perl5/5.8.2/man/man3 -Dman1dir=/usr/local/man/man1 \
> > -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.2/mach \
> > -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.2 -Dscriptdir=/usr/local/bin \
> > -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O -mcpu=pentiumpro \
> > -march=pentiumpro  -Duseshrplib \
> > -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -Ud_dosuid -Ui_gdbm \
> > -Dusethreads=n -Dusemymalloc=y' 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=y, bincompat5005=undef
> > Compiler:
> > cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" \
> > -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include', \
> > optimize='-O -mcpu=pentiumpro -march=pentiumpro ', \
> > cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -DHAS_FPSETMASK \
> > -DHAS_FLOATINGPOINT_H -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, prototype=define
> > Linker and Libraries:
> > ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
> > libpth=/usr/lib /usr/local/lib
> > libs=-lgdbm -lm -lcrypt -lutil -lc
> > perllibs=-lm -lcrypt -lutil -lc
> > 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.2/mach/CORE' cccdlflags='-DPIC -fPIC', \
> > lddlflags='-shared  -L/usr/local/lib' 
> > Locally applied patches:
> > 
> > 
> > ---
> > @INC for perl v5.8.2:
> > /usr/local/lib/perl5/site_perl/5.8.2/mach
> > /usr/local/lib/perl5/site_perl/5.8.2
> > /usr/local/lib/perl5/site_perl
> > /usr/local/lib/perl5/5.8.2/BSDPAN
> > /usr/local/lib/perl5/5.8.2/mach
> > /usr/local/lib/perl5/5.8.2
> > .
> > 
> > ---
> > Environment for perl v5.8.2:
> > HOME=/home/genuser
> > LANG (unset)
> > LANGUAGE (unset)
> > LD_LIBRARY_PATH (unset)
> > LOGDIR (unset)
> > PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:.:/usr/local/jdk1.4.2/bin:/usr/local/ssl/bin
> >  PERL_BADLANG (unset)
> > SHELL=/bin/tcsh
> > 
> > 
> 
> -- 
> Andy Dougherty		doughera@lafayette.edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic