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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Thu Jun 06 06:01:32 2024 UTC