php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14070 Segfault with concurrent postgres connections
Submitted: 2001-11-15 11:09 UTC Modified: 2001-11-15 19:17 UTC
From: mw at sime dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.6 OS: Linux 2.2.19ext3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mw at sime dot com
New email:
PHP Version: OS:

 

 [2001-11-15 11:09 UTC] mw at sime dot com
PHP segfaults in several places, when the following conditions occur:

1. two or more concurrent connections from the same script to the same datebase, with EXACTLY the same connect string.
2. one of the links must be closed
3. the other link is used
4. postgres sends notices (e.g. rollback; commit) etc.

the problem is in pgsql.c/php_pgsql_do_connect(), around line 443. it uses the connect string as hash key to find such a connection, and if subsequenct connect calls use the same connect string, the connection seems to be reused (which is wrong. it should NOT be reused).

the effects vary, sometimes it segfaults, sometimes not.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-15 19:17 UTC] sniper@php.net
This should be fixed in CVS. Try latest CVS snapshot from
http://snaps.php.net/ and if it doesn't work, reopen this 
bug report.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 12 20:01:33 2024 UTC