Bug #75794 [Fbk->Opn]: getenv() crashes on Windows 7.2.1 when second parameter is false

From: Date: Thu, 11 Jan 2018 10:26:41 +0000
Subject: Bug #75794 [Fbk->Opn]: getenv() crashes on Windows 7.2.1 when second parameter is false
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213467@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75794&edit=1 ID: 75794 User updated by: jon at senyahnoj dot org dot uk Reported by: jon at senyahnoj dot org dot uk Summary: getenv() crashes on Windows 7.2.1 when second parameter is false -Status: Feedback +Status: Open Type: Bug Package: Reproducible crash Operating System: Windows PHP Version: 7.2.1 Block user comment: N Private report: N New Comment: Loading control script C:\Program Files\DebugDiag\scripts\CrashRule_Process_php-cgi.exe.vbs DumpPath set to C:\Program Files\DebugDiag\Logs\Crash rule for all instances of php-cgi.exe [11/01/2018 10:16:06] Process created. BaseModule - D:\phpBinaries\win64\7.2\php-cgi.exe. BaseThread - System ID: 7024 C:\Windows\SYSTEM32\ntdll.dll loaded at 0x432f0000 Thread created. New thread - System ID: 6260 C:\Windows\system32\KERNEL32.DLL loaded at 0x40e70000 C:\Windows\system32\KERNELBASE.dll loaded at 0x40240000 D:\phpBinaries\win64\7.2\php7.dll loaded at 0x25750000 C:\Windows\system32\WS2_32.dll loaded at 0x41e90000 C:\Windows\system32\ADVAPI32.dll loaded at 0x41db0000 C:\Windows\SYSTEM32\VCRUNTIME140.dll loaded at 0x33700000 C:\Windows\SYSTEM32\api-ms-win-crt-stdio-l1-1-0.dll loaded at 0x336f0000 C:\Windows\SYSTEM32\api-ms-win-crt-environment-l1-1-0.dll loaded at 0x336e0000 C:\Windows\SYSTEM32\api-ms-win-crt-heap-l1-1-0.dll loaded at 0x32990000 C:\Windows\SYSTEM32\api-ms-win-crt-string-l1-1-0.dll loaded at 0x32980000 C:\Windows\SYSTEM32\api-ms-win-crt-runtime-l1-1-0.dll loaded at 0x318d0000 C:\Windows\SYSTEM32\api-ms-win-crt-convert-l1-1-0.dll loaded at 0x318a0000 C:\Windows\SYSTEM32\api-ms-win-crt-filesystem-l1-1-0.dll loaded at 0x31720000 C:\Windows\SYSTEM32\api-ms-win-crt-math-l1-1-0.dll loaded at 0x31710000 C:\Windows\SYSTEM32\api-ms-win-crt-locale-l1-1-0.dll loaded at 0x31700000 C:\Windows\system32\ole32.dll loaded at 0x41bc0000 C:\Windows\system32\USER32.dll loaded at 0x41260000 C:\Windows\SYSTEM32\DNSAPI.dll loaded at 0x3f300000 C:\Windows\SYSTEM32\bcrypt.dll loaded at 0x3fbf0000 C:\Windows\SYSTEM32\api-ms-win-crt-time-l1-1-0.dll loaded at 0x316f0000 C:\Windows\SYSTEM32\api-ms-win-crt-utility-l1-1-0.dll loaded at 0x31640000 C:\Windows\system32\RPCRT4.dll loaded at 0x415d0000 C:\Windows\system32\NSI.dll loaded at 0x41bb0000 C:\Windows\system32\msvcrt.dll loaded at 0x40fb0000 C:\Windows\SYSTEM32\sechost.dll loaded at 0x40e20000 C:\Windows\SYSTEM32\combase.dll loaded at 0x40c60000 C:\Windows\system32\GDI32.dll loaded at 0x41060000 C:\Windows\SYSTEM32\ucrtbase.DLL loaded at 0x29a80000 C:\Windows\system32\dzuser32.dll loaded at 0x40050000 C:\Windows\system32\bcryptprimitives.dll loaded at 0x3ff20000 D:\phpBinaries\win64\7.2\ext\ioncube_loader_win_7.2.dll loaded at 0x80000000 D:\phpBinaries\win64\7.2\ext\php_bz2.dll loaded at 0x31070000 D:\phpBinaries\win64\7.2\ext\php_curl.dll loaded at 0x299f0000 D:\phpBinaries\win64\7.2\libssh2.dll loaded at 0x651c0000 D:\phpBinaries\win64\7.2\nghttp2.dll loaded at 0x30a30000 D:\phpBinaries\win64\7.2\libcrypto-1_1-x64.dll loaded at 0x25450000 D:\phpBinaries\win64\7.2\libssl-1_1-x64.dll loaded at 0x29960000 C:\Windows\system32\WLDAP32.dll loaded at 0x413b0000 C:\Windows\system32\Normaliz.dll loaded at 0x41460000 C:\Windows\system32\CRYPT32.dll loaded at 0x404a0000 C:\Windows\system32\MSASN1.dll loaded at 0x40220000 D:\phpBinaries\win64\7.2\ext\php_fileinfo.dll loaded at 0x24f80000 D:\phpBinaries\win64\7.2\ext\php_gd2.dll loaded at 0x276e0000 D:\phpBinaries\win64\7.2\ext\php_intl.dll loaded at 0x298f0000 D:\phpBinaries\win64\7.2\icuuc60.dll loaded at 0x592e0000 D:\phpBinaries\win64\7.2\icuin60.dll loaded at 0x58580000 D:\phpBinaries\win64\7.2\icuio60.dll loaded at 0x598c0000 C:\Windows\SYSTEM32\MSVCP140.dll loaded at 0x27640000 D:\phpBinaries\win64\7.2\icudt60.dll loaded at 0x60f00000 C:\Windows\SYSTEM32\api-ms-win-crt-multibyte-l1-1-0.dll loaded at 0x31060000 D:\phpBinaries\win64\7.2\ext\php_mbstring.dll loaded at 0x24e20000 D:\phpBinaries\win64\7.2\ext\php_mysqli.dll loaded at 0x31000000 D:\phpBinaries\win64\7.2\ext\php_openssl.dll loaded at 0x30390000 D:\phpBinaries\win64\7.2\ext\php_pdo_mysql.dll loaded at 0x31050000 D:\phpBinaries\win64\7.2\ext\php_com_dotnet.dll loaded at 0x308d0000 C:\Windows\system32\OLEAUT32.dll loaded at 0x41ef0000 D:\phpBinaries\win64\7.2\ext\php_soap.dll loaded at 0x298b0000 D:\phpBinaries\win64\7.2\ext\php_xsl.dll loaded at 0x29440000 D:\phpBinaries\win64\7.2\ext\php-7.2.x_memcache.dll loaded at 0x30260000 D:\phpBinaries\win64\7.2\ext\php_pdo_sqlsrv.dll loaded at 0x29870000 C:\Windows\SYSTEM32\ODBC32.dll loaded at 0x324f0000 D:\phpBinaries\win64\7.2\ext\php_sqlsrv.dll loaded at 0x28be0000 C:\Windows\SYSTEM32\secur32.dll loaded at 0x3bdf0000 C:\Windows\SYSTEM32\SSPICLI.DLL loaded at 0x3fef0000 C:\Windows\system32\mswsock.dll loaded at 0x3f610000 C:\Windows\SYSTEM32\IPHLPAPI.DLL loaded at 0x3df40000 C:\Windows\SYSTEM32\WINNSI.DLL loaded at 0x3ded0000 C:\Windows\SYSTEM32\dhcpcsvc.DLL loaded at 0x3d1d0000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL loaded at 0x3d420000 Thread created. New thread - System ID: 6624 Initializing control script Clearing any existing breakpoints Current Breakpoint List(BL) Thread exited. Exiting thread - System ID: 6624. Exit code - 0x00000000 [11/01/2018 10:16:13] Exception 0X80000003 on thread 7024. DetailID = 1 Stack Trace RetAddr : Args to Child : Call Site 000007fb433cf350 : 0000004464670000 0000004464c03918 0000004464670000 000007fb`29a8295e : ntdll!RtlpNtCreateKey+0x30ab 000007fb43375e81 : 0000004464c70030 0000000000000000 0000000000000000 00000044`64683fe0 : ntdll!RtlpNtCreateKey+0x7f04 000007fb29a942cb : 0000004464683fe0 0000004464c70030 0000004464681d90 00000000`00000001 : ntdll!RtlSetCurrentEnvironment+0x33b5 000007fb25b99294 : 000007f752282e00 0000004464c03918 0000004464c03918 00000044`655c6538 : ucrtbase!free+0x1b 000007fb2591a724 : 0000004464c1d100 0000000000000002 0000004464c70030 00000044`6458b4f0 : php7!libiconv_set_relocation_prefix+0x5a274 000007fb2576b1d3 : 0000000000000000 000007fb25919bf0 0000000000000000 00000044`64c03900 : php7!php_base64_decode_ex+0x3444 000007fb2576ce40 : 8000000000000000 000007fb25766ed0 000007fb2576b180 00000001`8006f2c4 : php7!array_init+0x4d3 000007fb25760aa0 : 000000018006f3d0 0000000000000000 0000004464c830e0 00000000`00000008 : php7!execute_ex+0x80 000007fb257605a5 : 0000000000000000 000000446458e2d0 0000004464c604b0 00000000`00000008 : php7!zend_execute+0x150 000007fb25760305 : 0000004400000008 0000000000000000 0000000000000003 00000000`00000000 : php7!zend_execute_scripts+0xa5 000007f752287e7b : 0000000000000000 0000000000000000 0000000000000000 00000000`00000001 : php7!php_execute_script+0x335 000007f7522834dc : 0000000000000000 0000000000000000 000007fb29b659f4 00000000`00000000 : php_cgi+0x7e7b 000007fb40e71842 : 0000000000000000 0000000000000000 0000000000000000 00000000`00000000 : php_cgi+0x34dc 000007fb4333e2f9 : 0000000000000000 0000000000000000 0000000000000000 00000000`00000000 : KERNEL32!BaseThreadInitThunk+0x1a 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21 Action limit of 1 reached for unconfigured first chance exceptions. Exception 0XC0000374 on thread 7024. DetailID = 2 Second chance exception - 0XC0000374 caused by thread with System ID: 7024 DetailID = 2 Thread exited. Exiting thread - System ID: 7024. Exit code - 0xffffffff Process exited. Exit code - 0xffffffff *********************** * EXCEPTION DETAILS * *********************** DetailID = 1 Count: 1 Exception #: 0X80000003 Stack: ntdll!RtlpNtCreateKey+0x30ab ntdll!RtlpNtCreateKey+0x7f04 ntdll!RtlSetCurrentEnvironment+0x33b5 ucrtbase!free+0x1b php7!libiconv_set_relocation_prefix+0x5a274 php7!php_base64_decode_ex+0x3444 php7!array_init+0x4d3 php7!execute_ex+0x80 php7!zend_execute+0x150 php7!zend_execute_scripts+0xa5 php7!php_execute_script+0x335 php_cgi+0x7e7b php_cgi+0x34dc KERNEL32!BaseThreadInitThunk+0x1a ntdll!RtlUserThreadStart+0x21 DetailID = 2 Count: 2 Exception #: 0XC0000374 Stack: ntdll!RtlpNtCreateKey+0x30e9 ntdll!RtlpNtCreateKey+0x7f04 ntdll!RtlSetCurrentEnvironment+0x33b5 ucrtbase!free+0x1b php7!libiconv_set_relocation_prefix+0x5a274 php7!php_base64_decode_ex+0x3444 php7!array_init+0x4d3 php7!execute_ex+0x80 php7!zend_execute+0x150 php7!zend_execute_scripts+0xa5 php7!php_execute_script+0x335 php_cgi+0x7e7b php_cgi+0x34dc KERNEL32!BaseThreadInitThunk+0x1a ntdll!RtlUserThreadStart+0x21 *********************** * EXCEPTION SUMMARY * *********************** |--------------------| | Count | Exception | |--------------------| | 2 | 0XC0000374 | | 1 | 0X80000003 | |--------------------| Debugging Overhead Cost: Total Elapsed Ticks = 7520 (100%) Total Ticks Spent in Debugger Engine = 313 (4%) Total Ticks Spent in Crash Rule Script = 188 (2%) Previous Comments: ------------------------------------------------------------------------ [2018-01-10 15:06:19] ab@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2018-01-10 14:34:47] jon at senyahnoj dot org dot uk Description: ------------ Using PHP 7.2.1 (64 bit NTS) on (Windows Server 2012/Windows 7) + IIS FastCGI. The fast CGI process crashes when PHP calls getenv() with a second parameter (local_only) of false. It's fine if the second parameter is true. It does not crash on the previous version 7.2.0. PHP 7.2.1 on linux also fine. We are wondering if this is a windows platform-specific problem. Could this be related to Bug #75574 which was released in 7.2.1? Test script: --------------- <?php getenv('HTTP_ACCEPT_LANGUAGE', false); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75794&edit=1

« previous php.bugs (#213467) next »