Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 14232
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: door [...] lcpi.ru
Cc:
AdminCc:

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



Subject: bug in dbd_db_pg_notifies - sigfault in Perl_pp_leavetry
OS: Linux 2.6.8-2-686 i686 GNU/Linux perl: perl, v5.8.4 built for i386-linux-thread-multi DBD::Pg: 1.43 DBI: 1.48 dbd_db_pg_notifies on error of PQconsumeInput returns int 0 instead of SV* &sv_undef. This causes sigfault if used in eval{} sample sode: my $dbh = DBI->connect("dbi:Pg:dbname=test", "test", "test", {RaiseError=>1} ); while(1) { eval { $dbh->func('pg_notifies'); # here may (or may not) be other code: # $dbh->do("select 1"); }; sleep(1); } now connection closed (postgres restarted) and we have coredump correction patch attached
--- dbdimp.c.orig 2005-08-18 17:04:39.000000000 +0400 +++ dbdimp.c 2005-08-18 17:05:02.000000000 +0400 @@ -725,7 +725,7 @@ if (0 == status) { status = PQstatus(imp_dbh->conn); pg_error(dbh, status, PQerrorMessage(imp_dbh->conn)); - return 0; + return &sv_undef; } notify = PQnotifies(imp_dbh->conn);
Thanks - this has been fixed in cvs and will be a part of 1.44.