Your message dated Mon, 10 Mar 2008 19:32:07 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#450744: fixed in libdbd-sqlite3-perl 1.14-2
has caused the Debian Bug report #450744,
regarding libdbd-sqlite3-perl: segv re-using statement after error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
450744: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450744
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: libdbd-sqlite3-perl
Version: 1.14-1
Severity: normal

The program foo.pl below run as "perl foo.pl" produces

    DBD::SQLite::st execute failed: column x is not unique(19) at dbdimp.c line 
403 at foo.pl line 17.
    Segmentation fault

where I hoped it wouldn't seg fault, but just print the error message
and otherwise succeed.


I suspect that when sqlite_st_execute gets an "insert" error like this
it ends up freeing the underlying "sqlite3_stmt" object, so that a
further execute of it bombs.  I think the free is done by the following
line in sqlite_st_execute (the first one, at "return -5"),

    /* There are bug reports that say this should be sqlite3_reset() */
    sqlite3_finalize(imp_sth->stmt);

I think the comment is right, under gdb you can see the stmt pointer
value getting used again on the next execute of the same perl-level
$sth.  Actually I saw that stmt space getting overwritten with the error
message string "column x is not unique ...", which made me wonder if was
some sort of pointer juggling mixup, but I think it's just coincidence
that it's related data ending up there after the space has been free()ed
and then handed out by malloc() again.  (Results vary if for instance
you turn on $dbh->trace()s.)


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i586)

Kernel: Linux 2.6.22-2-486
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages libdbd-sqlite3-perl depends on:
ii  libc6                         2.6.1-2    GNU C Library: Shared libraries
ii  libdbi-perl                   1.601-1    Perl5 database interface by Tim Bu
ii  libsqlite3-0                  3.4.2-2    SQLite 3 shared library
ii  perl                          5.8.8-11.1 Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.8]     5.8.8-11.1 The Pathologically Eclectic Rubbis

libdbd-sqlite3-perl recommends no packages.

-- no debconf information

use strict;
use warnings;
use DBI;

my $filename = '/tmp/foo.db';
unlink ($filename);

my $dbh = DBI->connect ("dbi:SQLite:dbname=$filename", '', '',
                        {RaiseError=>0, PrintError=>1});
$dbh->do ('CREATE TABLE bar (x TEXT, y TEXT, PRIMARY KEY (x))');

{
  my $sth = $dbh->prepare ("INSERT INTO bar (x, y) VALUES (?,?)");
  $sth->execute ('a', 'b');
  $sth->finish;

  $sth->execute ('a', 'b');
  $sth->finish;

  $sth->execute ('c', 'd');
  $sth->finish;
}

--- End Message ---
--- Begin Message ---
Source: libdbd-sqlite3-perl
Source-Version: 1.14-2

We believe that the bug you reported is fixed in the latest version of
libdbd-sqlite3-perl, which is due to be installed in the Debian FTP archive:

libdbd-sqlite3-perl_1.14-2.diff.gz
  to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.14-2.diff.gz
libdbd-sqlite3-perl_1.14-2.dsc
  to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.14-2.dsc
libdbd-sqlite3-perl_1.14-2_amd64.deb
  to pool/main/libd/libdbd-sqlite3-perl/libdbd-sqlite3-perl_1.14-2_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niko Tyni <[EMAIL PROTECTED]> (supplier of updated libdbd-sqlite3-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 10 Mar 2008 21:16:30 +0200
Source: libdbd-sqlite3-perl
Binary: libdbd-sqlite3-perl
Architecture: source amd64
Version: 1.14-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <[EMAIL PROTECTED]>
Changed-By: Niko Tyni <[EMAIL PROTECTED]>
Description: 
 libdbd-sqlite3-perl - Perl DBI driver with a self-contained RDBMS
Closes: 450744 470272 470281
Changes: 
 libdbd-sqlite3-perl (1.14-2) unstable; urgency=medium
 .
   [ gregor herrmann ]
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza); Homepage field (source stanza). Removed:
     Homepage pseudo-field (Description); XS-Vcs-Svn fields.
 .
   [ David Paleino ]
   * debian/control: removed myself from Uploaders
 .
   [ Niko Tyni ]
   * Switch to my @debian.org address.
   * Manage debian/patches with quilt.
   * error_reset.patch: fix sqlite error handling.        (Closes: #450744)
     + fixes a test failure with sqlite3 3.5.6.           (Closes: #470281)
     + fixes libdbix-class-perl FTBFS with sqlite3 3.5.6. (Closes: #470272)
   * Upgrade to Standards-Version 3.7.3. No changes needed.
   * Minor tweaks to debian/rules.
   * Depend on ${misc:Depends}, as per debhelper(7).
   * Set urgency to medium as this fixes two release-critical bugs in testing.
Files: 
 0b9ad5c34dae520da0f3f0b67b01f32b 1119 perl optional 
libdbd-sqlite3-perl_1.14-2.dsc
 8a216afd16c7f6c8cc90a86456d9f50c 5838 perl optional 
libdbd-sqlite3-perl_1.14-2.diff.gz
 4e34fd3fd08347eda8b17b350e153055 51902 perl optional 
libdbd-sqlite3-perl_1.14-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH1YqOiyizGWoHLTkRAhujAJ48coJjMXd5XmrjXX1AdzHlSwtuVgCfQ2CB
EYAPbtLaygZTD+RhX4ej4hE=
=j8ir
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to