From:             [EMAIL PROTECTED]
Operating system: redhat 6.2
PHP version:      4.0 Latest CVS (05/02/2001)
PHP Bug Type:     dBase related
Bug description:  the dbase functions either segfault or generate the following debug 
information

<?php

<?php
        $dbf = dbase_open("eitmact.DBF", 0);

        $numrecs = dbase_numrecords($dbf);

        print "Number of records: " . $numrecs . "\n";
        print "\n";

        for ($i=0;$i<=$numrecs;$i++) {
                $row = dbase_get_record($dbf, $i);
        }


  
?>
---------------------------------------
dbase.c(478) : Block 0x082E20B0 status:
Beginning:      OK (allocated on dbase.c:448, 9 bytes)
      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
---------------------------------------
dbase.c(478) : Block 0x082E20B0 status:
Beginning:      OK (allocated on dbase.c:448, 9 bytes)


      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
                At least 4 bytes overflown
---------------------------------------
[Mon Feb  5 14:07:14 2001]  Script:  'test.php'
---------------------------------------
dbase.c(478) : Block 0x082E4968 status:
Beginning:      OK (allocated on dbase.c:448, 2 bytes)
      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
                At least 4 bytes overflown
---------------------------------------
[Mon Feb  5 14:07:14 2001]  Script:  'test.php'
---------------------------------------
dbase.c(478) : Block 0x082E4850 status:
Beginning:      OK (allocated on dbase.c:448, 1 bytes)
      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
                At least 4 bytes overflown---------------------------------------
[Mon Feb  5 14:07:14 2001]  Script:  'test.php'
---------------------------------------
dbase.c(478) : Block 0x082E4968 status:
Beginning:      OK (allocated on dbase.c:448, 2 bytes)
      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
                At least 4 bytes overflown
---------------------------------------
[Mon Feb  5 14:07:14 2001]  Script:  'test.php'
---------------------------------------
dbase.c(478) : Block 0x082E4850 status:
Beginning:      OK (allocated on dbase.c:448, 1 bytes)
      End:      Overflown (magic=0x20202020 instead of 0x2A8FCC84)
                At least 4 bytes overflown

./configure \
--enable-bcmath \
--enable-wddx \
--with-xml \
--with-zlib \
--with-regex=system \
--enable-debug \
--enable-magic-quotes=yes \
--enable-force-cgi-redirect \
--with-gd=/usr/local/ \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--enable-gd-imgstrttf=/usr/local \
--enable-memory-limit \
--with-sybase=/usr/local/freetds \
--with-config-file-path=/etc/php4/cgi \
--bindir=/usr/local/apache/cgi-bin \
--with-cpdflib=/usr/local \
--enable-ttf=/usr/local \
--enable-dbase

gdb backtrace
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `php -f t.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /usr/local/freetds/lib/libsybdb.so.0...done.
Reading symbols from /usr/lib/libttf.so.2...done.
Reading symbols from /usr/lib/libpng.so.2...done.
Reading symbols from /usr/lib/libjpeg.so.62...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /usr/lib/libz.so.1...done.
#0  chunk_alloc (ar_ptr=0x40209d60, nb=184) at malloc.c:2814
2814    malloc.c: No such file or directory.
(gdb) bt
#0  chunk_alloc (ar_ptr=0x40209d60, nb=184) at malloc.c:2814
#1  0x401745ce in __libc_malloc (bytes=176) at malloc.c:2696
#2  0x4016d83b in _IO_new_fopen (filename=0x40202731 "/etc/localtime", mode=0x402027a2 
"r") at iofopen.c:42
#3  0x401a5406 in __tzfile_read (file=0x40202731 "/etc/localtime", extra=0, 
extrap=0x0) at tzfile.c:149
#4  0x401a43e7 in tzset_internal (always=538976104) at tzset.c:172
#5  0x401a50db in __tz_convert (timer=0xbfffe3b0, use_localtime=1, tp=0xbfffe1ac) at 
tzset.c:582
#6  0x401a0cc1 in __localtime_r (t=0xbfffe3b0, tp=0xbfffe1ac) at localtime.c:33
#7  0x80693b2 in php_message_handler_for_zend (message=6, data=0x0) at main.c:557
#8  0x8113b9d in zend_message_dispatcher (message=6, data=0x0) at zend.c:551
#9  0x8103a26 in _mem_block_check (ptr=0x82bfcdc, silent=0, __zend_filename=0x81743ad 
"dbase.c", __zend_lineno=478, 
    __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:572
#10 0x8103cc4 in _mem_block_check (ptr=0x82bfcdc, silent=1, __zend_filename=0x81743ad 
"dbase.c", __zend_lineno=478, 
    __zend_orig_filename=0x0, __zend_orig_lineno=0) at zend_alloc.c:627
#11 0x8102af9 in _efree (ptr=0x82bfcdc, __zend_filename=0x81743ad "dbase.c", 
__zend_lineno=478, __zend_orig_filename=0x0, 
    __zend_orig_lineno=0) at zend_alloc.c:213
#12 0x8079feb in php_if_dbase_get_record (ht=2, return_value=0x82c4334, this_ptr=0x0, 
return_value_used=1) at dbase.c:478
#13 0x8147b49 in execute (op_array=0x82bf9ac) at ./zend_execute.c:1493
#14 0x811417b in zend_execute_scripts (type=8, file_count=3) at zend.c:743
#15 0x806a1bc in php_execute_script (primary_file=0xbffffb00) at main.c:1166
#16 0x8068339 in main (argc=3, argv=0xbffffb74) at cgi_main.c:736


-- 
Edit Bug report at: http://bugs.php.net/?id=9121&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to