|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-10-28 19:05 UTC] glen at delfi dot ee
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)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
yes. appears so: $ ./configure --disable-all --with-mysql --enable-maintainer-zts --enable-debug $ make $ ./sapi/cli/php -r '$r = mysql_pconnect("heart");echo "$r\n";'; echo "rc=$?" Resource id #4 rc=0 $ ./sapi/cli/php -m [PHP Modules] date mysql standard [Zend Modules] code used: php5-200510281630