php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2398 'END' command to PostgresSQL causing SEGV.
Submitted: 1999-09-28 14:44 UTC Modified: 2002-06-16 08:58 UTC
From: lucas at slf dot cx Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 3.0.12 OS: linux 2.2.12
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 + 41 = ?
Subscribe to this entry?

 
 [1999-09-28 14:44 UTC] lucas at slf dot cx
Performing a pg_exec($database,"end") on a connection causes the child pid to exit with a SEGV. This may have something to do with PostgreSQL sending a notice message through libpg.


 In the interactive client, psql, there is normally a NOTICE sent to the client:

 webdb=> commit;
 END
 webdb => end;
 NOTICE:  EndTransactionBlock and not inprogress/abort state
 END
 webdb => \q

...and in the backtrace (from running http -X inside gdb), the last mentioned function is 'defaultNoticeProcessor()':

#0  0x40222ee1 in ?? ()
#1  0x40185605 in ?? ()
#2  0x4018ceb3 in ?? ()
#3  0x4031fd1b in defaultNoticeProcessor () from /usr/local/pgsql/lib/libpq.so.2.0
#4  0x40320cf0 in getNotice () from /usr/local/pgsql/lib/libpq.so.2.0
#5  0x403202ff in parseInput () from /usr/local/pgsql/lib/libpq.so.2.0
#6  0x40320b4e in PQgetResult () from /usr/local/pgsql/lib/libpq.so.2.0
#7  0x40320ca3 in PQexec () from /usr/local/pgsql/lib/libpq.so.2.0
#8  0x40291a4c in php3_pgsql_exec () at functions/pgsql.c:124

All tested scripts worked 100% when I removed the 'BEGIN'/'COMMIT'/'END' pg_exec() statements.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:58 UTC] sander@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 22:01:27 2024 UTC