[PHP-DEV] Bug #1103 Updated: segfault in dbmfetch() or dbmfirstkey)( From: Bug Database (php-dev <email protected>)
Date: 02/02/99

ID: 1103
User Update by: morrilie <email protected>
Status: Open
Old-Bug Type: Reproduceable crash
Bug Type: DBM related
Description: segfault in dbmfetch() or dbmfirstkey)(

The problem: segfaults in dbmfetch() and dbmfirstkey().

dbmopen(), dbmclose(), dbminsert() work fine.

when running php from a shell script all is ok. Problem appears only when
running php from commandline or as apache module.
Sample script:
#!/bin/sh
php -f 003.php3t

That's all. Same command on the cli causes segfault.

php 3.0.6
apache 1.3.4
linux 2.0.36
gdbm 1.7.3

backtrace:

#0 php3_dbmfetch(ht=0x80f93a8, return_value=0x80c745c,
   list=0x80e8920, plist=0x80e88f4) at functions/db.c:617
#1 phpparse() at control_functions_inline.h:930
#2 php3_parse(yyparse=0x80f3998) at main.c:1474
#3 main(...) at main.c:1782
#4 ___crt_dummy___ ()

Return_value, which is a pointer, has some
small value , and writing results of the operation at functions/db.c:617
causes segfaults. I encountered values 0x5 0x6 0x1d.

Just looked at *list. (it is a hashtable) - it has ridiculous fields!
nTableSize = 1936287828 and others not differ much.
*plist seems to make sense
*ht - nonsense

Full Bug description available at: http://ca.php.net/bugs.php3?id=1103

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>