Bug #75074 [Com]: php-process crash when is_file() is used with strings longer 260 chars

From: Date: Mon, 14 Aug 2017 12:06:08 +0000
Subject: Bug #75074 [Com]: php-process crash when is_file() is used with strings longer 260 chars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210672@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75074&edit=1 ID: 75074 Comment by: trpro at gmx dot de Reported by: trpro at gmx dot de Summary: php-process crash when is_file() is used with strings longer 260 chars Status: Feedback Type: Bug Package: Filesystem function related Operating System: Windows 7 PHP Version: 7.1.8 Block user comment: N Private report: N New Comment: VC14 redistributable x86 is installed correctly. PHP 7.1.8 NTS x86 is running without problems on my system, but only this one function (is_file) with parameter (length > 260) will fail! PHP 7.0.22 NTS x86, PHP 7.1.8 NTS x64 and PHP 7.1.8 TS x86, will work fine with the test-script. We checked the script on my collegues pc and, there is the same error, he also has Win 7 Pro x64. I downloaded a vm from: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ (VM: IE10 Win7 (x86), Plattform: VMware) to test it and the php process will also die in the vm. On the vm, i only installed visual c++ redist 2015 x86 and downloaded PHP. Windows gave me the following infos: <WERReportMetadata> <OSVersionInformation> <WindowsNTVersion>6.1</WindowsNTVersion> <Build>7601 Service Pack 1</Build> <Product>(0x30): Windows 7 Professional</Product> <Edition>Professional</Edition> <BuildString>7601.23714.amd64fre.win7sp1_ldr.170307-1800</BuildString> <Revision>1130</Revision> <Flavor>Multiprocessor Free</Flavor> <Architecture>X64</Architecture> <LCID>1031</LCID> </OSVersionInformation> <ProblemSignatures> <EventType>APPCRASH</EventType> <Parameter0>php.exe</Parameter0> <Parameter1>7.1.8.0</Parameter1> <Parameter2>5980eee1</Parameter2> <Parameter3>VCRUNTIME140.dll</Parameter3> <Parameter4>14.0.24215.1</Parameter4> <Parameter5>57bfd587</Parameter5> <Parameter6>c0000005</Parameter6> <Parameter7>0000d4de</Parameter7> </ProblemSignatures> ... </WERReportMetadata> This comes from the windows event log: Faulting application name: php.exe, version: 7.1.8.0, time stamp: 0x5980eee1 Faulting module name: VCRUNTIME140.dll, version: 14.0.24215.1, time stamp: 0x57bfd587 Exception code: 0xc0000005 Fault offset: 0x0000d4de Faulting process id: 0x3320 Faulting application start time: 0x01d314ee83915ac3 Faulting application path: c:\Temp\PHP 7.1.8 NTS x86\php.exe Faulting module path: C:\Windows\system32\VCRUNTIME140.dll Report Id: c27563d3-80e1-11e7-aa2e-f0d5bfcc86ce Previous Comments: ------------------------------------------------------------------------ [2017-08-14 09:47:01] daverandom@php.net Have now tested with all 4 official release builds on both W7 x64 and W10 x64, cannot reproduce in any configuration. I don't have any x86 Windows installations handy to test against. ------------------------------------------------------------------------ [2017-08-14 09:41:27] daverandom@php.net I cannot reproduce this on Win 10 x64, tried with php-7.1.8-nts-Win32-VC14-x64, php-7.1.8-nts-Win32-VC14-x86, and php-7.1.8-Win32-VC14-x64. Please can you double check that you have the x86 VC14 redistributables correctly installed on your system? Test script: --------------- C:\Users\chris.wright>d:\temp\php-7.1.8-nts-Win32-VC14-x86\php.exe -c d:\temp\php-7.1.8-nts-Win32-VC14-x86\php.ini-production -r "$data = str_pad('', 461, 'x'); var_dump(is_file($data));" bool(false) ------------------------------------------------------------------------ [2017-08-14 09:13:33] trpro at gmx dot de Description: ------------ When i check a string if it is a valid path, and the string is longer then 260 chars, the php-process (cgi and cli) will crash. I use a fresh downloaded php 7.1.8 (VC14 x86 Non Thread Safe (2017-Aug-02 00:22:56)), with the default php.ini from the archive. cmd: .\php.exe -c .\php.ini-production C:\phptest.php Operatingsystem: Windows 7 Professional SP1 with all updates installed. Test script: --------------- <?php $data = str_pad("", 261, "x"); is_file($data); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75074&edit=1

« previous php.bugs (#210672) next »