From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0394D1F466 for ; Mon, 20 Jan 2020 19:25:09 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Yxqj1yQ4ORQU7xyt F/zKxWP/u5oVyhw8XIYUGWOz3yAmTt2fT7RJQMWa1H0IBYEHZwa+KaMco7cHMbbY +wZ4Z6s1YOZl6YGzYGeCSXV/fq65jtiWC3pXeVSXwXT7XB3pX9JoqAY2qqawRx4+ 7Im/ZEF+JulZN56X/Ls5FAdb+Gw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=o/7Ax4tlUqww71mt6Gq3/e KKiNw=; b=Xq2IAeiva/oHtMqfn4KapCMVMBm65iv2nNi072OHzy3+GumHzxD1M9 +0s6+bqCXJXfk/jWLbrn6eSu2KMRPNWruFO45QnJBYnhAHH3lTNtjVwyEDCcJlZL Zthgr2irejdM2jCW+DLcmDfksjYbb77YBKefQ2ruYm59lRGlMIigc= Received: (qmail 100034 invoked by alias); 20 Jan 2020 19:25:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 100023 invoked by uid 89); 20 Jan 2020 19:25:06 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: zimbra.cs.ucla.edu Subject: Re: question about regex To: liqingqing , =?UTF-8?Q?Tim_R=c3=bchsen?= Cc: libc-alpha@sourceware.org, Florian Weimer , Carlos O'Donell , Hushiyuan , Liusirui References: <05dfac46-6cf3-1f5d-14e7-3c8b07b2093e@cs.ucla.edu> <377311fb-fdf3-6467-3b48-28404d8c3326@huawei.com> From: Paul Eggert Message-ID: <034194cc-908b-d29f-5ee7-9cf273868ff0@cs.ucla.edu> Date: Mon, 20 Jan 2020 11:25:01 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/20/20 2:41 AM, liqingqing wrote: > it's not a easy work to fix bug#24269 by modify the regex algorithm. > a possible way is that add a backtrack limit to avoid infinite loop. If there's an arbitrary backtrack limit, won't that cause the code to mishandle some regular expressions? That is, wouldn't an arbitrary limit cause the code to incorrectly fail to match in some cases? In some sense that would be worse than looping. Perhaps I am misunderstanding what you're proposing. If so, could you give more details about the proposal?