From: pdp2108 at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.2.8
PHP Bug Type: Reproducible crash
Bug description: calls to mysql_connect crash
Description:
------------
I have an isolated test case that reliably generates a segmentation fault
in php5ts.dll.
Here is the environment:
Windows XP, SP2, Single Athlon 64 3200+ CPU, 1 GB RAM
MySQL version 5.1.30 for Win32
Apache version 2.2.10 for Win32
PHP 5.2.8
PHP was installed with the .msi installer. The following extensions were
added at installation: GD, mysql, mysqli and multi-byte string.
I have configured Apache & MySQL and have created some databases, which I
can access through mysql and Navicat. I have used a simple phpinfo.php
script to track down an incorrect libmysql.dll in my path and have
eliminated that and have verified that the client version of libmysql is
5.1.30 in phpinfo.
Reproduce code:
---------------
<?php
mysql_connect('localhost', 'root', 'root');
print('Past mysql_connect');
?>
Expected result:
----------------
One expects to see the "Past mysql_connect" statement print out.
Actual result:
--------------
Thread 0 - System ID 4232
Entry point php!mainCRTStartup
Create time 12/12/2008 2:17:59 AM
Time spent in user mode 0 Days 0:0:0.0
Time spent in kernel mode 0 Days 0:0:0.31
Function Arg 1 Arg 2 Arg 3 Source
php5ts!zend_mm_search_large_block+fa 00f35230 00000048
0000001c
php5ts!_zend_mm_alloc_int+153 00000000 0000003f 1009ba69
php5ts!_emalloc+39 0000003f 0111c4c8 00f327a0
php5ts!_zend_hash_add_or_update+2d9 00f36148 0111c4e0 0000001c
php_mysql!php_mysql_do_connect+867 0111c460 0111c4c8 00000000
php_mysql!zif_mysql_connect+25 00000003 0111c4c8 00000000
php5ts!zend_do_fcall_common_helper_SPEC+7d9 00c0fbd0 00f327a0
0111be8c
php5ts!ZEND_DO_FCALL_SPEC_CONST_HANDLER+e5 00000000 00f327a0
00f327a0
php5ts!execute+1c5 0111be98 00f327a0 00000000
php5ts!zend_execute_scripts+107 00000008 00f327a0 00000000
php5ts!php_execute_script+20d 00c0fec8 00f327a0 0000000e
php!main+bca 00000003 00f33fd0 00f32d60
php!mainCRTStartup+e3 0000000e 00000000 7ffdf000
kernel32!BaseProcessStart+23 00402f72 00000000 00000000
PHP5TS!ZEND_MM_SEARCH_LARGE_BLOCK+FAIn
php__PID__3284__Date__12_12_2008__Time_02_18_29AM__734__Second_Chance_Exception_C0000005.dmp
the assembly instruction at php5ts!zend_mm_search_large_block+fa in
C:\PHP\php5ts.dll from The PHP Group has caused an access violation
exception (0xC0000005) when trying to read from memory location 0x00000014
on thread 0
Module Information
Image Name: C:\PHP\php5ts.dll Symbol Type: PDB
Base address: 0x10000000 Time Stamp: Mon Dec 08 14:31:08 2008
Checksum: 0x00000000 Comments:
COM DLL: False Company Name: The PHP Group
ISAPIExtension: False File Description: PHP Script Interpreter
ISAPIFilter: False File Version: 5.2.8.8
Managed DLL: False Internal Name: php5ts.dll
VB DLL: False Legal Copyright: Copyright © 1997-2007 The PHP Group
Loaded Image Name: php5ts.dll Legal Trademarks: PHP
Mapped Image Name: C:\PHP\php5ts.dll Original filename: php5ts.dll
Module name: php5ts Private Build:
Single Threaded: False Product Name: PHP Script Interpreter
Module Size: 4.98 MBytes Product Version: 5.2.8
Symbol File Name: C:\PHP_Debug\php5ts.pdb Special Build: &
--
Edit bug report at http://bugs.php.net/?id=46842&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46842&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46842&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46842&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46842&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46842&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46842&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46842&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46842&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46842&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46842&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46842&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46842&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46842&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46842&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46842&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46842&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46842&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46842&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46842&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46842&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46842&r=mysqlcfg