I have come up with a small perl script which consistently causes a segmentation fault using DBD-Pg. I have included it below, along with collected version information.
- Matt PS - The DBD-Pg README has an invalid email address for bug reports PPS - http://dbi.symbolstone.org/index.html has outdated links to the DBI mailing lists ----- #!/usr/bin/env perl require 5.6.0; use strict; use warnings; require DBI; my $dbname = "name"; my $dbuser = "user"; # CREATE TABLE test (name CHARACTER VARYING(16)); my $table = "test"; my $db = 0; $db = DBI->connect("dbi:Pg:dbname=$dbname", $dbuser, 0, { AutoCommit => 0 }); die "Cannot open database" if ($db == 0); my $name = "aaaaa"; while (1) { my $q = "INSERT INTO $table (name) VALUES ('" . $name++ . "')"; my $sf = $db->prepare_cached($q, undef, 1); die "cannot prepare query $q" if (!$sf); my $rv = $sf->execute(); die "cannot execute $q" if (!$rv); } __END__ $ perl -v This is perl, v5.6.0 built for i386-netbsd Copyright 1987-2000, 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.0 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.com/, the Perl Home Page. $ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=netbsd, osvers=1.5_alpha2, archname=i386-netbsd uname='netbsd build-00.gdib.nominum.com 1.5_alpha2 netbsd 1.5_alpha2 (from generic-1.354.2.8 $revision: 1.4 $) #0: tue oct 3 08:21:29 utc 2000 [EMAIL PROTECTED]:u0srcsysarchi386compileibm1g i386 ' config_args='-sde -Dprefix=/usr/pkg -Doptimize=-O2 -Darchname=i386-netbsd -Dcc=gcc -Dusemymalloc=false -Duseshrplib=true' 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='gcc', optimize='-O2', gccversion=egcs-2.91.66 19990314 (egcs-1.1.2 release) cppflags='-fno-strict-aliasing -I/usr/pkg/include' ccflags ='-fno-strict-aliasing -I/usr/pkg/include' stdchar='char', d_stdstdio=undef, 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=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/pkg/lib' libpth=/usr/pkg/lib /usr/lib libs=-lm -lcrypt libc=/usr/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib/perl5/5.6.0/i386-netbsd/CORE' cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared -L/usr/pkg/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under netbsd Compiled at Oct 10 2000 17:15:13 @INC: /usr/pkg/lib/perl5/5.6.0/i386-netbsd /usr/pkg/lib/perl5/5.6.0 /usr/pkg/lib/perl5/site_perl/5.6.0/i386-netbsd /usr/pkg/lib/perl5/site_perl/5.6.0 /usr/pkg/lib/perl5/site_perl . $ psql name user Welcome to psql, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit gns=> select version(); version -------------------------------------------------------------- PostgreSQL 7.1.2 on i386--netbsd, compiled by GCC egcs-1.1.2 (1 row) gns=> \q $ perl -MDBD::Pg -le 'print $DBD::Pg::VERSION' 1.00 $ perl -MDBI -le 'print $DBI::VERSION' 1.18
