#20927 [Opn->Fbk]: Crash inside libpq (PQexec) with PHP > 4.1.2
| From: | sniper@php.net | Date: | Wed, 11 Dec 2002 06:59:23 +0000 |
| Subject: | #20927 [Opn->Fbk]: Crash inside libpq (PQexec) with PHP > 4.1.2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27313@lists.php.net to get a copy of this message | ||
ID: 20927
Updated by: sniper@php.net
Reported By: dfs@roaringpenguin.com
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Red Hat Linux 8.0 on Intel
PHP Version: 4.3.0RC2
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-12-10 19:42:59] dfs@roaringpenguin.com
This is difficult (impossible) to reproduce with a short script.
Please download and unpack
http://www.roaringpenguin.com/segfault.tar.bz2
You need to have PostgreSQL and create a specific database with
specific data in it. Here's the README file from the tarball:
SUMMARY: PHP segfaults for PHP versions > 4.1.2
-----------------------------------------------
THE SOURCE FILES IN THIS ARCHIVE ARE PROPRIETARY COMMERCIAL SOFTWARE.
PLEASE USE THEM ONLY TO DEBUG PHP PROBLEMS.
System: Red Hat Linux 8.0
PostgreSQL: 7.2.2, as supplied with Red Hat Linux 8.0
Apache: 1.3.27, configured as follows:
./configure --with-layout=Apache --enable-shared=max \
--enable-rule=SHARED_CORE
PHP: Tried 4.2.2, 4.2.3 and 4.3.0RC2, all configured as follows:
./configure --with-pgsql=shared \
--with-gnu-ld \
--with-apxs=/usr/local/apache/bin/apxs
HOW TO REPRODUCE:
-----------------
1) Install Apache 1.3.27 and PHP 4.2.2, 4.2.3 or 4.3.0RC2 from source.
Configure PostgreSQL 7.2.2 to trust local connections. That is, in
/var/lib/pgsql/data/pg_hba.conf, make the local line read thus:
local all trust
2) Create and populate the database:
createdb -U postgres spam
psql -U postgres -d spam < spam-database-dump
3) Copy the PHP files to your document root somewhere convenient.
4) Browse http://your_server/these_php_files/index.php
5) Log in as "admin", password "foo"
6) Click on "Pending Messages" - Apache will segfault.
However: Using PHP 4.1.2, configured as above, it works fine.
Extensive investigation shows that it's segfaulting inside libpq,
inside
PQexec, but the function which segfaults is "malloc" which leads me
to believe there's memory corruption going on.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20927&edit=1