PHP 4.0 Bug #5731: Segmentation fault with dbase_add_record() (trace included)

From: Date: Fri, 21 Jul 2000 23:27:55 +0000
Subject: PHP 4.0 Bug #5731: Segmentation fault with dbase_add_record() (trace included)
Groups: php.dev 
Request: Send a blank email to php-dev+get-25394@lists.php.net to get a copy of this message
From: cahagn_o@epita.fr Operating system: NetBSD 1.3.3, RedHat 6.2 PHP version: 4.0 Latest CVS (22/07/2000) PHP Bug Type: dBase related Bug description: Segmentation fault with dbase_add_record() (trace included) Hi, I ran some tests with PHP 4.0.2-dev snapshot php4-200007211345. I saw that dbase_create() was finally fixed so this ran fine. Every other dBase function runs fine, except dbase_add_record(). (gdb) run -e -q -f add.php Starting program: /space/www/bin/php/php-4.0.2-dev_debug -e -q -f add.php Program received signal SIGSEGV, Segmentation fault. 0x7f21d in _zval_ptr_dtor (zval_ptr=0x22c198) at zend_execute_API.c:270 zend_execute_API.c:270: No such file or directory. Here's create.php that works fine (basically, dbase_get_record(), dbase_delete_record(), dbase_pack(), etc. work but dbase_add_record()): #!/space/www/bin/php/php <? $fields = array( array("Name", "C", 32), array("Balance", "N", 8, 2), array("Birthday", "D"), array("Commercial", "L") ); $db = dbase_create("customer.dbf", $fields); dbase_close($db); ?> Here's the most simple script that will segfault PHP, add.php: #!/space/www/bin/php/php <? $db = dbase_open("customer.dbf", 2); $newRecord = array("John Smith", 100.00, "199980901", "Y"); dbase_add_record($db, $newRecord); dbase_close($db); ?> Here's my ./configure: ./configure --with-config-file-path=/space/www/etc/httpd/conf/php_cgi \ --enable-discard-path \ --with-gd=/u/guest/www/mbin/i386-NetBSD \ --with-mysql \ --with-dbase \ --with-zlib=/u/guest/www/mbin/i386-NetBSD \ --with-mcrypt=/u/guest/www/mbin/i386-NetBSD \ --with-mhash=/u/guest/www/mbin/i386-NetBSD \ --enable-ftp \ --enable-inline-optimization \ --with-jpeg-dir=/u/guest/www/mbin/i386-NetBSD \ --with-imap=/u/guest/www/mbin/i386-NetBSD/lib Everything mentioned by theses lines works (except GD+PNG but that's another story :) I tried this on a basic RH6.2 and gets the same result: here's the trace, running the same scripts and same snapshot with basic ./configure (gdb) run -e -q -f add.cgi Starting program: /usr/local/bin/php -e -q -f add.cgi Program received signal SIGSEGV, Segmentation fault. 0x80c4c55 in _zval_ptr_dtor (zval_ptr=0x8145550) at zend_execute_API.c:270 270 (*zval_ptr)->refcount--;

« previous php.dev (#25394) next »