ID: 44283 User updated by: izh1979 at gmail dot com Reported By: izh1979 at gmail dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Linux 2.6.23.15-137.fc8 PHP Version: 5.2.5 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [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