ID: 47689 Updated by: paj...@php.net Reported By: vr...@php.net -Status: Assigned +Status: Feedback Bug Type: PCRE related Operating System: Windows only PHP Version: * Assigned To: pajoye New Comment:
Please try using 5.3.0 VC9 snapshots(ts or NTS): http://windows.php.net Previous Comments: ------------------------------------------------------------------------ [2009-04-10 15:15:15] nlop...@php.net this is the usual stack problem. Since we now use the stack for PCRE recursion on Windows, I think we could increase the stack size. The default (1 MB) is a little short.. Pierre: can you please increase the stack size on windows binaries to e.g. 8 MB? It's a matter of adding one parameter to the compile arguments. More details at: http://msdn.microsoft.com/en-us/library/tdkhxaks(VS.71).aspx ------------------------------------------------------------------------ [2009-03-19 10:22:04] vr...@php.net Both configuration directives are on the default value 100000. I've found out that with much longer input (600 lines) the script crashes also in CLI. There's no crash in PHP 5.2.8, only PHP 5.2.9 is affected. ------------------------------------------------------------------------ [2009-03-18 23:16:14] fel...@php.net Hi Jakub, please check the pcre.backtrack_limit and pcre.recursion_limit value. ------------------------------------------------------------------------ [2009-03-18 13:10:15] vr...@php.net I've uploaded the backtrace analysis to http://www.vrana.cz/phpbug47689.zip ------------------------------------------------------------------------ [2009-03-17 13:57:03] vr...@php.net Description: ------------ Apache 2.2.11 crashes with PHP 5.2.9-1 on the following code. The same script run from CLI executes without crash. Reproduce code: --------------- <?php $contents = '/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */'; // shortest possible example, omitting last line causes no crash $contents = preg_replace('@/\\*(?:.|[\\n\\r])*?\\*/@', '', $contents); ?> Expected result: ---------------- Empty string in $contents. Actual result: -------------- Apache crash. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47689&edit=1