php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8229 core dump on dbase_replace_record
Submitted: 2000-12-13 08:53 UTC Modified: 2001-10-30 19:02 UTC
From: gandalf at rss dot cz Assigned:
Status: Closed Package: dBase related
PHP Version: 4.0.3pl1 OS: RedHat 7.0 2.2.18 kernel
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gandalf at rss dot cz
New email:
PHP Version: OS:

 

 [2000-12-13 08:53 UTC] gandalf at rss dot cz
The following script prints "PACKED" and dumps core.

<?php

        $dbname = "/tmp/testdb.dbf";
        $rarr = array("Polasek","Vonasek");
        $zme = array("Vonasek","Polasek");

        $def = array(
                array("name",   "C",    50),
		array("name2",   "C",    50),
        );

        if (!dbase_create($dbname, $def))
                print "FAILED\n";

        $dbid = dbase_open($dbname,2);

        if (!dbase_add_record($dbid,$rarr))
                print "ADD RECORD FAILED!";

        if (dbase_pack($dbid)) {
                echo "PACKED\n";
        }

        if (dbase_replace_record($dbid,$zme,1)) {
                echo "RECORD CHANGED\n";
        }else{
                echo "CHANGE FAILED\n";
        }
?}

==================================================
'./configure' '--with-config-file-path=/etc'
'--with-apxs=/usr/sbin/apxs' '--enable-versioning'
'--enable-inline-optimization' '--enable-shared'
'--enable-track-vars' '--enable-magic-quotes'
'--enable-safe-mode' '--with-db2' '--with-db3' '--with-gdbm'
'--with-gd=shared' '--enable-debugger' '--enable-sysvsem'
'--enable-sysvshm' '--enable-dbase' '--with-readline'
'--without-mysql'
==================================================
gdb backtrace:

Core was generated by `php dbftest.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libpam.so.0...(no debugging
symbols found)...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng.so.2...done.
Loaded symbols for /usr/lib/libpng.so.2
Reading symbols from /lib/libdb-3.1.so...done.
Loaded symbols for /lib/libdb-3.1.so
Reading symbols from /usr/lib/libdb.so.3...done.
Loaded symbols for /usr/lib/libdb.so.3
Reading symbols from /usr/lib/libgdbm.so.2...done.
Loaded symbols for /usr/lib/libgdbm.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libttf.so.2...done.
Loaded symbols for /usr/lib/libttf.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x80caea1 in _zval_ptr_dtor ()
(gdb) bt
#0  0x80caea1 in _zval_ptr_dtor ()
#1  0x80d6c15 in zend_hash_destroy ()
#2  0x80d1da3 in _zval_dtor ()
#3  0x80caeb6 in _zval_ptr_dtor ()
#4  0x8103f4a in execute ()
#5  0x80d31df in zend_execute_scripts ()
#6  0x805ec91 in php_execute_script ()
#7  0x805cf29 in main ()
#8  0x401f3a7c in __libc_start_main (main=0x805c748 <main>,
argc=2, ubp_av=0xbffffab4,
    init=0x805b204 <_init>, fini=0x810e2fc <_fini>,
rtld_fini=0x4000d684 <_dl_fini>,
    stack_end=0xbffffaac) at ../sysdeps/generic/libc-start.c:111


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-30 19:02 UTC] sniper@php.net
Fixed in CVS.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 03:01:29 2025 UTC