Bug #79307 [Opn->Fbk]: httpd crash when combine strings in php
| From: | cmb@php.net | Date: | Tue, 25 Feb 2020 17:29:09 +0000 |
| Subject: | Bug #79307 [Opn->Fbk]: httpd crash when combine strings in php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225725@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79307&edit=1
ID: 79307
Updated by: cmb@php.net
Reported by: idzjy at live dot cn
Summary: httpd crash when combine strings in php
-Status: Open
+Status: Feedback
Type: Bug
Package: Apache2 related
Operating System: Windows 10
PHP Version: 7.3.15
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2020-02-25 14:40:18] idzjy at live dot cn
Description:
------------
when trying to combine thousands of strings using concatenation operator ('.'), httpd
crash.
like:
https://github.com/laminas/laminas-validator/blob/master/src/Hostname/Biz.php
https://github.com/laminas/laminas-validator/blob/master/src/Hostname/Cn.php
the php package was downloaded directly from https://windows.php.net/downloads/releases/php-7.3.15-Win32-VC15-x64.zip
apache version: 2.4.37 on windows with wampserver 3.1.7 64bit.
crash on 7.2.14 / 7.3.9 / 7.3.15, not on 5.6.40 as I tested.
crash on apache, not cli.
// logs
apache log:
[Tue Feb 25 22:04:01.612217 2020] [mpm_winnt:notice] [pid 273704:tid 764] AH00428: Parent: child
process 282396 exited with status 3221225725 -- Restarting.
php logs nothing.
Windows Event Viewer:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2020-02-25T14:03:58.936699400Z" />
<EventRecordID>49477</EventRecordID>
<Channel>Application</Channel>
<Computer>***</Computer>
<Security />
</System>
- <EventData>
<Data>httpd.exe</Data>
<Data>2.4.37.0</Data>
<Data>5bf538f3</Data>
<Data>php7ts.dll</Data>
<Data>7.3.15.0</Data>
<Data>5e4bea74</Data>
<Data>c00000fd</Data>
<Data>0000000000011f92</Data>
<Data>44f1c</Data>
<Data>01d5ebe4613b26c1</Data>
<Data>D:\wamp64\bin\apache\apache2.4.37\bin\httpd.exe</Data>
<Data>D:\wamp64\bin\apache\apache2.4.37\bin\php7ts.dll</Data>
<Data>caca7d2d-d7d9-4478-a028-6429e916ab68</Data>
<Data />
<Data />
</EventData>
</Event>
Test script:
---------------
<?php
// test1.php
$a =
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890';
// ... 2000 lines in total, crash
var_dump($a);
//////////////////////////////////////////////////
<?php
// test2.php
$a =
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890';
// ... 1000 lines in total, ok
$b =
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890' .
'123456789012345678901234567890';
// ... 1000 lines in total, ok
$c = $a + $b;
var_dump($c);
// everything is fine
//////////////////////////////////////////////////
// same thing happens even if reduce the length of the single string to '123'.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79307&edit=1