From:             glen at delfi dot ee
Operating system: PLD Linux
PHP version:      5CVS-2005-10-28 (snap)
PHP Bug Type:     Reproducible crash
Bug description:  mysql_pconnect() crashes on PHP-CLI when ZTS is enabled

Description:
------------
$ php -r 'mysql_pconnect();'
Segmentation fault

you will need to specify proper auth strings for the connection to
succeed.

bug is present in php 4.4.0, php 5.0.5 with both ZTS enabled. on same
system disabling ZTS with php 4.4.0 the crash didn't occour.

also used php5-STABLE-200510281434 snapshot. and crash was reproducible.


Reproduce code:
---------------
$ gdb --args php -r 'mysql_pconnect();'
GNU gdb 6.3
Copyright 2004 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 "--host= --target=i686-pld-linux"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/php -r mysql_pconnect\(\)\;

Program received signal SIGSEGV, Segmentation fault.
0xb7879948 in ?? ()
(gdb) bt
#0  0xb7879948 in ?? ()
#1  0xb7f0d549 in plist_entry_destructor (ptr=0x80dbb00)
    at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_list.c:210
#2  0xb7f0b53f in zend_hash_apply_deleter (ht=0x8052c60, p=0x80e3f40)
    at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_hash.c:574
#3  0xb7f0b790 in zend_hash_graceful_reverse_destroy (ht=0x8052c60)
    at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_hash.c:640
#4  0xb7f0d665 in zend_destroy_rsrc_list (ht=0x8052c60,
tsrm_ls=0x804f0a8)
    at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_list.c:240
#5  0xb7f0146a in zend_shutdown (tsrm_ls=0x804f0a8) at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend.c:714
#6  0xb7eaa3e3 in php_module_shutdown (tsrm_ls=0x804f0a8)
    at /home/builder/rpm/BUILD/php5-STABLE-200510281434/main/main.c:1529
#7  0x0804be44 in main (argc=3, argv=0xbfcb04a4)
    at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/sapi/cli/php_cli.c:1058
(gdb)


-- 
Edit bug report at http://bugs.php.net/?id=35009&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35009&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=35009&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=35009&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35009&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35009&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35009&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35009&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35009&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35009&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35009&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=35009&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=35009&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35009&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35009&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35009&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35009&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35009&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35009&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35009&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35009&r=mysqlcfg

Reply via email to