ID: 26659 Updated by: [EMAIL PROTECTED] Reported By: keith at ksmith dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Slackware 8.1 / Others PHP Version: 4.3.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2003-12-17 22:57:42] keith at ksmith dot com chaning to odbc_connect or removing first include_once eliminates the problem ------------------------------------------------------------------------ [2003-12-17 22:55:22] keith at ksmith dot com Description: ------------ This is an example of code that will cause PHP to segfault on exit. It will otherwise perform all functions, the *exit* causes the segfault The combination appears to be the use of TWO(2) include files coupled with a *persistent* odbc connection Run this, type something for input, that is not a file or hit ctrl-d Below is segfault2.php: <?php function do_nothing() {print "I did nothing\n";} ?> Does same thing with cgi/sapi && much lighter weight options list, this was a recent re-compile to see if problem still in 4.3.4. Tested with 4.3.1 cli/cgi also. Configure Command => './configure' '--prefix=/usr' '--with-cpdflib' '--with-db2' '--with-dba' '--enable-dbase' '--with-gdbm' '--with-ndbm' '--with-curl' '--with-freetype-dir=/usr/X11R6' '--with-gd' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--with-imagick=/usr/X11R6' '--with-jpeg-dir=/usr' '--with-mcrypt' '--with-mhash' '--with-pgsql=/opt/pgsql' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--with-unixODBC=/opt/unixODBC' '--with-xpm-dir=/usr/X11R6' '--enable-bcmath' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--with-zlib' '--with-bz2' '--enable-ftp' '--disable-url-fopen-wrapper' '--with-openssl' '--disable-short-tags' '--enable-pcntl' Reproduce code: --------------- <?php include_once("./segfault2.php"); // db_webdoc.inc.php appropriate php wrappings: // $dsn = "some_dsn"; // $dbuser = "username"; // $dbpass = "password"; $dbcfg = getcwd() . "/includes/db_webdoc.inc.php"; include_once($dbcfg); $dbh = odbc_pconnect($dsn, $dbuser, $dbpass); while($fbase = fgets(STDIN, 1024)) { $fbase = trim($fbase); clearstatcache(); if(!is_file($fbase)) { print "No such file: $fbase\n"; break; } } exit(0); ?> Expected result: ---------------- Should exit with status 0. Actual result: -------------- Exits by segfaulting with status 139 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26659&edit=1
