|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-10-04 17:04 UTC] mb at smartftp dot com
Description: ------------ The following crash occurs every minute: unction Arg 1 Arg 2 Arg 3 Source php5!_estrdup+10 00000000 00c0de74 00c0de74 php5!UpdateIniFromRegistry+141 00000000 00c0d400 100ab2e0 php5!php_execute_script+b1 00c0de74 0040a500 00000001 php_cgi!main+ab0 00000001 01871300 018717c8 php_cgi!memset+160 7ffdf000 00c0ffd4 776919bb kernel32!BaseThreadInitThunk+e 7ffdf000 79a4bd48 00000000 ntdll!__RtlUserThreadStart+23 004062ca 7ffdf000 00000000 ntdll!_RtlUserThreadStart+1b 004062ca 7ffdf000 00000000 Find complete crash report at: http://rapidshare.com/files/288635650/CrashHang_Report__PID_3112__PID_3728__PID_4460__PID_472__PID_5168__PID_5216__PID_5276__PID_5388__100.html Reproduce code: --------------- not available Expected result: ---------------- no crash Actual result: -------------- crash PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 15:00:02 2025 UTC |
I don't think you need a script. A little bit of time and motivation would do as well: Please review your code: File: main.c PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC) { ... #ifdef PHP_WIN32 UpdateIniFromRegistry(primary_file->filename TSRMLS_CC); #endif .. } Then: File: registry.c void UpdateIniFromRegistry(char *path TSRMLS_DC) { -> BUG: missing check for argument // here comes the check for Per Directory registry value. If it is not found the function exists and never comes to the estrdup and hence no crash. ... orig_path = path = estrdup(path); .. } The problem only happens if the "Per Directory Values" registry key is present. In this case estrdup(NULL) is called and you get the crash. So I think the argument (path) should be checked for NULL. And when I look at the main.c I also noticed that you sometimes expect the primary_file->filename to be null, so maybe you add a check before the UpdateIniFromRegistry() call. Proposed FIX: #ifdef PHP_WIN32 if(primary_file->filename) { UpdateIniFromRegistry(primary_file->filename TSRMLS_CC); } #endif + Add argument check for UpdateIniFromRegistry Workaround: Remove "Per Directories Values" registry key. Regards, Mat