#47689 [Opn->Fbk]: Apache crash with certain regular expression

From: Date: Tue, 17 Mar 2009 16:18:51 +0000
Subject: #47689 [Opn->Fbk]: Apache crash with certain regular expression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134821@lists.php.net to get a copy of this message
ID: 47689 Updated by: iliaa@php.net Reported By: vrana@php.net -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: Windows PHP Version: 5.2.9-1 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: ------------------------------------------------------------------------ [2009-03-17 13:57:03] vrana@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

« previous php.bugs (#134821) next »