|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-01 15:41 UTC] david at harksystems dot com
I am getting an access violation in php4ts!zend_strndup + 0x2B + 0xA05CB1AD. It is reproducable after about 20 or 30 requests, but it isn't a certain page that causes it. A page refresh may or may not display the page without error. Eventually the server will no longer serve pages at all and only a reboot will bring the web server back. Stopping IIS just sits there attempting to stop the service. Details: Windows 2000 Pro with service pack 2 and all critical and security updates from windowsupdate.microsoft.com K6-2 500MHz with 192Meg RAM I have the exact setup on my machine using an Athlon 1.2GHz with 512Meg RAM without any problem. However on two machines with an AMD K6-2 (configured identically) the web server will stop responding to requests consistently. I have also tested this on my Dell laptop with an Intel PIII/700MHz 256 Meg RAM with same Windows 2000 pro w/sp2 and all updates without any problem. When the server does stop serving pages the DLLHOST.EXE process virtual memory size goes to the max for the machine. I have installed php as an ISAPI module. I have also tried installing PHP as a CGI and have the same problem. I have tested this with php 4.0.6, 4.1.0, and 4.1.1 and have the same problem in zend_strndup with all three. I am using the windows zip file from the php.net download page. Also I am using the Interbase extension. No other extensions are being used. I hope I included enough info here. Thanks. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
I think I've found the problem: ZEND_API char *zend_strndup(const char *s, uint length) { char *p; p = (char *) malloc(length+1); if (!p) { return (char *)NULL; } if (length) { memcpy(p, s, length); } p[length] = 0; return p; } If this is changed to ZEND_API char *zend_strndup(const char *s, uint length) { char *p; p = (char *) malloc(length+1); if (!p) { return (char *)NULL; } if (length) { memcpy(p, s, length); p[length] = 0; } return p; } does that break anything? I think the problem comes in when length==0. I can't really reproduce this problem though. I saw it once a couple of days ago, but havn't seen it since. Also will one of you that's having this problem please check to see if 4.2.0 RC 2 still has this problem? Since 4.2.0 is going to be released really soon now, I'd like to get this worked through (but if it doesn't happen anymore under 4.2.0 then we're worrying about nothing).Hello, I can't come up with a working test case but I have an idea which might help narrow the search. I have two PHP applications, one of which works fine in IIS and the other of which causes this bug frequently. The only significant difference that I can find between the two apps is that the one that hangs IIS uses sessions and cookies, whereas the stable one does not. I removed the calls to session_start and session_register from the unstable one, and after some testing it appears to still work. I'll give an update after some more testing has been done. Windows 2000 Server, Service pack 3 + .NET Framework (sp2) PHP 4.2.2 as ISAPI