ID:               35009
 Updated by:       [EMAIL PROTECTED]
 Reported By:      glen at delfi dot ee
-Status:           Verified
+Status:           Assigned
-Bug Type:         MySQL related
+Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5CVS-2005-11-06 (cvs)
-Assigned To:      
+Assigned To:      dmitry
 New Comment:

Seems to happen with any shared extension's persistent resources.
Dmitry, can you check this out please?


Previous Comments:
------------------------------------------------------------------------

[2005-11-06 15:30:37] [EMAIL PROTECTED]

Verified. Reproducing steps:

# ./configure --disable-all --with-mysql=shared --enable-maintainer-zts
--enable-debug
# make
# gdb --args sapi/cli/php -dextension_dir=.
-dextension=modules/mysql.so -r '$f = mysql_pconnect();'
(gdb) run


------------------------------------------------------------------------

[2005-11-01 16:42:25] glen at delfi dot ee

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

------------------------------------------------------------------------

[2005-11-01 11:39:45] [EMAIL PROTECTED]

What if you configure the mysql extension as static, does it work then?

------------------------------------------------------------------------

[2005-10-28 19:05:48] 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)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35009&edit=1

Reply via email to