ID: 44283 Updated by: [EMAIL PROTECTED] Reported By: izh1979 at gmail dot com -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Linux 2.6.23.15-137.fc8 PHP Version: 5.2CVS-2008-02-28 New Comment:
I can't reproduce this. Try running the script without loading php.ini using the '-n' option. If it still fails, provide the full configure line you used. Previous Comments: ------------------------------------------------------------------------ [2008-02-28 17:24:11] izh1979 at gmail dot com Here is backtrace from core: #0 0x00110402 in __kernel_vsyscall () #1 0x00959ac6 in kill () from /lib/libc.so.6 #2 0x0817a829 in zend_mm_panic (message=0x8295bc0 "zend_mm_heap corrupted") at /home/bsg/php5.2-200802281530/Zend/zend_alloc.c:94 #3 0x0817b9d2 in zend_mm_check_leaks (heap=0xa02b1c8) at /home/bsg/php5.2-200802281530/Zend/zend_alloc.c:1194 #4 0x0817c5fe in zend_mm_shutdown (heap=0xa02b1c8, full_shutdown=0, silent=0) at /home/bsg/php5.2-200802281530/Zend/zend_alloc.c:1567 #5 0x0817e85f in shutdown_memory_manager (silent=0, full_shutdown=0) at /home/bsg/php5.2-200802281530/Zend/zend_alloc.c:2477 #6 0x08149634 in php_request_shutdown (dummy=0x0) at /home/bsg/php5.2-200802281530/main/main.c:1506 #7 0x08219129 in main (argc=2, argv=0xbfd296d4) at /home/bsg/php5.2-200802281530/sapi/cli/php_cli.c:1321 ------------------------------------------------------------------------ [2008-02-28 17:16:28] izh1979 at gmail dot com For php5.2-200802281530 problem is actual: Connected successfully. [Thu Feb 28 20:15:31 2008] Script: '/home/bsg/www/t.php' --------------------------------------- /home/bsg/php5.2-200802281530/ext/mysql/php_mysql.c(316) : Block 0x0a03d3fc status: Invalid pointer: ((size=0x00000251) != (next.prev=0x00000000)) --------------------------------------- Disconnected successfully. [Thu Feb 28 20:15:31 2008] Script: '/home/bsg/www/t.php' --------------------------------------- /home/bsg/php5.2-200802281530/Zend/zend_opcode.c(240) : Block 0x0a03e0c4 status: Invalid pointer: ((prev=0x00000a78) != (prev.size=0x00000000)) --------------------------------------- zend_mm_heap corrupted ------------------------------------------------------------------------ [2008-02-28 16:55:39] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2008-02-28 15:14:31] izh1979 at gmail dot com Description: ------------ PHP 5.2.5, MySQL 5.0.51a, for redhat-linux-gnu (i686) using EditLine wrapper. Running test script with correct user password, you will see: Connected successfully. [Thu Feb 28 18:04:59 2008] Script: '/home/bsg/www/t.php' --------------------------------------- /home/user/php/ext/mysql/php_mysql.c(316) : Block 0x08f54820 status: Invalid pointer: ((size=0x00000251) != (next.prev=0x00000000)) --------------------------------------- Disconnected successfully. [Thu Feb 28 18:04:59 2008] Script: '/home/bsg/www/t.php' --------------------------------------- /home/user/php/Zend/zend_opcode.c(238) : Block 0x08f554e8 status: Invalid pointer: ((prev=0x00000a78) != (prev.size=0x00000000)) --------------------------------------- zend_mm_heap corrupted Segmentation fault First problem occured in php_mysql.c(316) in function _close_mysql_link on line "efree(link);". Second in zend_opcode.c in function destroy_op_array on line "efree(op_array->vars[i].name);". If you change hostname or password to wrong, you will see another error: Warning: mysql_connect(): Unknown MySQL server host 'localhost2' (1) in /home/user/www/t.php on line 2 [Thu Feb 28 18:09:24 2008] Script: '/home/bsg/www/t.php' --------------------------------------- /home/user/php/ext/mysql/php_mysql.c(831) : Block 0x097db818 status: Invalid pointer: ((size=0x00000251) != (next.prev=0x00000000)) --------------------------------------- Could not connect: Unknown MySQL server host 'localhost2' (1) There is no segmentation fault now. But the problem is. In file php_mysql.c(831) the line is "efree(mysql);" in function php_mysql_do_connect. Reproduce code: --------------- % <?php $link = mysql_connect ('localhost', 'login', 'password'); if (!$link) die ("Could not connect: ". mysql_error ()); echo "Connected successfully.\n"; mysql_close ($link); echo "Disconnected successfully.\n"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44283&edit=1