From: Operating system: Linux PHP version: 5.3SVN-2010-03-12 (SVN) Package: DBM/DBA related Bug Type: Bug Bug description:Crash when using reopened persistent connection after one resource closed
Description: ------------ Do two dba_popen() calls using the same file. Close one resource with dba_close(). Then do a dba_fetch on the still open resource. This results in a crash in flatfile_findkey() with a NULL dba pointer. Program received signal SIGSEGV, Segmentation fault. 0x0817c3b4 in flatfile_findkey (dba=0x0, key_datum=...) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c:173 (gdb) bt #0 0x0817c3b4 in flatfile_findkey (dba=0x0, key_datum=...) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c:173 #1 0x0817bfaa in flatfile_fetch (dba=0x0, key_datum=...) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/ext/dba/libflatfile/flatfile.c:91 #2 0x0817a671 in dba_fetch_flatfile (info=0x89abb20, key=0x897b2bc "key1", keylen=4, skip=0, newlen=0xbfffd348) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/ext/dba/dba_flatfile.c:70 #3 0x0817871b in zif_dba_fetch (ht=2, return_value=0x897a638, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/cjones/phpsrc/php/php-src/branches/PHP_5_3/ext/dba/dba.c:1025 #4 0x0844ccf0 in zend_do_fcall_common_helper_SPEC (execute_data=0x89abcc8) at /home/cjones/phpsrc/php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h:313 #5 0x084507ae in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x89abcc8) at /home/cjones/phpsrc/php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h:1603 #6 0x0844c38d in execute (op_array=0x897ac98) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/Zend/zend_vm_execute.h:104 #7 0x0841ff12 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/cjones/phpsrc/php/php-src/branches/PHP_5_3/Zend/zend.c:1194 #8 0x083b6c16 in php_execute_script (primary_file=0xbffff7c4) at /home/cjones/phpsrc/php/php-src/branches/PHP_5_3/main/main.c:2260 #9 0x084dd733 in main (argc=2, argv=0xbffff954) at /home/cjones/phpsrc/php/php- src/branches/PHP_5_3/sapi/cli/php_cli.c:1192 Test script: --------------- See ext/dba/tests/dba015.phpt -- Edit bug report at http://bugs.php.net/bug.php?id=51278&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51278&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51278&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51278&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51278&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51278&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51278&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51278&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51278&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51278&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51278&r=support Expected behavior: http://bugs.php.net/fix.php?id=51278&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51278&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51278&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51278&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51278&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51278&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51278&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51278&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51278&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51278&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51278&r=mysqlcfg