From: [EMAIL PROTECTED] Operating system: Red Hat Linux 8.0 on Intel PHP version: 4.3.0RC2 PHP Bug Type: Reproducible crash Bug description: Crash inside libpq (PQexec) with PHP > 4.1.2
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 bug report at http://bugs.php.net/?id=20927&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20927&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20927&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20927&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20927&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20927&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20927&r=support Expected behavior: http://bugs.php.net/fix.php?id=20927&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20927&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20927&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20927&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20927&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20927&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20927&r=isapi