From: [EMAIL PROTECTED] Operating system: Redhat Linux PHP version: 4.2.3 PHP Bug Type: Reproducible crash Bug description: segfault using ODBC functions
I've been running PHP 4.2.1 for some time on a test machine with the following configure options: './configure' \ '--with-apxs' \ '--with-ibm-db2=shared' \ '--with-ldap=shared' \ '--with-mcrypt=shared' \ '--with-mhash=shared' \ '--enable-ftp' \ '--with-config-file-path=/etc' \ '--enable-trans-sid' \ '--enable-debug' \ '--with-png-dir=/usr/local' \ '--with-jpeg-dir=/usr/local' \ '--with-zlib=/usr/local' \ '--with-gd=/usr/local' \ Worked fine under Apache 1.3.20. Then I started doing some upgrades, upgrading Apache to 1.3.26 and OpenSSL to 0.9.6g. At this point, PHP stopped working, generating a segfault (11) in my Apache log every time an ODBC function was called. The following script would exhibit this behavior: <?php $dbconn = odbc_connect(<dsn>,<user>,<password>); ?> I was unable to get PHP to segfault with scripts that did not use ODBC functions. I then recompiled PHP as a CGI function to get a backtrace, which gives me this: #0 0x407173ac in ?? () #1 0x40117780 in __libc_start_main () from /lib/libc.so.6 I also stepped through the code while running the script given above. PHP appears to complete processing entirely, but segfaults when exiting. The exit_status variable was 0. I then stepped through the code while running a script with no odbc code: <?php print("Test!\n"); ?> This appears to complete exactly the same way the ODBC script did, with an exit_status of 0, but it does not segfault. Note that I've also upgraded to PHP 4.2.3 and I get the exact same problem. Here is a summary of my relevant versions: Linux Kernel 2.2.16 Apache 1.3.26 OpenSSL 0.9.6g mod_ssl 2.8.10-1.3.26 PHP 4.2.3 libc 2.2.3 Please let me know if I can supply any additional information. -- Edit bug report at http://bugs.php.net/?id=19456&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19456&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19456&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19456&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19456&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19456&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19456&r=support Expected behavior: http://bugs.php.net/fix.php?id=19456&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19456&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19456&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19456&r=globals