From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 13:39:25 2013 Received: (at submit) by debbugs.gnu.org; 30 Oct 2013 17:39:25 +0000 Received: from localhost ([127.0.0.1]:53122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbZjp-0007dC-0s for submit@debbugs.gnu.org; Wed, 30 Oct 2013 13:39:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37811) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbZUc-0007Eo-Kb for submit@debbugs.gnu.org; Wed, 30 Oct 2013 13:23:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbZUO-0006zE-5R for submit@debbugs.gnu.org; Wed, 30 Oct 2013 13:23:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZUO-0006zA-2m for submit@debbugs.gnu.org; Wed, 30 Oct 2013 13:23:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZUG-0003HM-Oz for bug-grep@gnu.org; Wed, 30 Oct 2013 13:23:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbZU9-0006th-B0 for bug-grep@gnu.org; Wed, 30 Oct 2013 13:23:20 -0400 Received: from mail-qc0-f177.google.com ([209.85.216.177]:50041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbZU9-0006tZ-7m for bug-grep@gnu.org; Wed, 30 Oct 2013 13:23:13 -0400 Received: by mail-qc0-f177.google.com with SMTP id u18so963786qcx.22 for ; Wed, 30 Oct 2013 10:23:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=ylxHcCtDVafi4xvRGWllNWwKx81uiXdYNJXOM6Kbifs=; b=i0fevsYifboD1LCSkPTtScci6Ls/v2UwN7+JtI5Q1qVolNW+Eii8J5uQn6h6+iub20 F7rYS2rzc5smN191Eyj6xTBqO3F38z+w1uVkJ4jBYQxTzJ5eIa5Jr/sVcgGgWXY/thzG 1Njs+JeZ+lD86agH/degO87z3PheC+M5OfTp6Rup7pJzsU1cA88b8/fJ2VD6MWogrDx0 eXNLlE+h74MumUVMM8YRgVD7Ezl5BfE88yfJWq5Ux3I3WElk6hczKex1HVBuljsCIms9 FQsqH30Kh1zDXUV5blE8wD8SgdKggGVDJ/bcq+MEJd1cCz9QavPHlmnpPHiFpXiaw1Oo CpYg== X-Gm-Message-State: ALoCoQmO2vZXXePll58Ds9329tJ5H+rbuh8ep9Rqn6IQqfTbtvyQzS04/DUQVz27RPTicEOhFqPx X-Received: by 10.224.147.208 with SMTP id m16mr9414922qav.3.1383153792131; Wed, 30 Oct 2013 10:23:12 -0700 (PDT) Received: from localhost (ool-4a588d72.dyn.optonline.net. [74.88.141.114]) by mx.google.com with ESMTPSA id kz8sm66429505qeb.0.2013.10.30.10.23.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2013 10:23:11 -0700 (PDT) Date: Wed, 30 Oct 2013 13:23:10 -0400 From: Dave Reisner To: bug-grep@gnu.org Subject: regression in grep 2.15 with PCRE searches Message-ID: <20131030172310.GM735@rampage> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 30 Oct 2013 13:39:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi, A user reported a regression in grep 2.15 which is easily reproducible as ``grep -P foo /bin/mount''. The root cause is that pcre_exec is returning PCRE_ERROR_BADUTF8 when the current locale supports UTF-8. This is unhandled by grep and causes it to call abort(). I bisected the breakage to commit 67436786c110bb which essentially introduces UTF-8 validation for all searched data. In a large number of file hierarchies, one may easily hit this via a recursive search. I crafted the following inline diff which fixes the problem. While I'm not sure of its correctness, it at least describes one possible fix. diff --git a/src/pcresearch.c b/src/pcresearch.c index ad5999d..ce55ab3 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -176,6 +176,9 @@ Pexecute (char const *buf, size_t size, size_t *match_size, switch (e) { case PCRE_ERROR_NOMATCH: +#ifdef HAVE_LANGINFO_CODESET + case PCRE_ERROR_BADUTF8: +#endif return -1; case PCRE_ERROR_NOMEMORY: Cheers, Dave From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 17:19:44 2013 Received: (at 15759) by debbugs.gnu.org; 30 Oct 2013 21:19:44 +0000 Received: from localhost ([127.0.0.1]:53544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbdB2-0005hL-4m for submit@debbugs.gnu.org; Wed, 30 Oct 2013 17:19:44 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:37894) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbdAz-0005gu-3b; Wed, 30 Oct 2013 17:19:41 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so1871071wgg.28 for ; Wed, 30 Oct 2013 14:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=oCU0PmZtuCdq7gMFMELBMDHHdGWDdbjUsr4noQHxpxM=; b=gdQ4+Le9LpT6/wXFHxtKrDwdrv8h5Hhs3R+4jEDQ1r/VIjxiCo3kvjAc9F3VwXi83D WZxBkMwO3lNucA13JFUBsWGEf/AjXpmDqxrU4k8QXOsie1FNAq1vSvNF6iRLQ+PReC0D xX/aWjUqeWLuC8dZsCx7Rjp911xIi2HjR1JU/CI3v+MDh84jKYaeArw7ZoR2QLm4IcdZ y9h2N0IyRmOXMuswMIZL9+C3XfqNi5EP/OB5TuJk/SuRsGj+bLuDu557I5gEme3AuSXv 5xza3+5G3tLAJVyq8mo1d2QLnY4CgyvGhrfiXUHgh5eorby76yo9kvYhNxJp1Hrvf6Pg 7amw== X-Received: by 10.181.12.75 with SMTP id eo11mr3929745wid.24.1383167975258; Wed, 30 Oct 2013 14:19:35 -0700 (PDT) Received: from [192.168.1.11] ([79.97.144.61]) by mx.google.com with ESMTPSA id y20sm47006wib.0.2013.10.30.14.19.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 14:19:34 -0700 (PDT) Message-ID: <527177E5.1090600@gmail.com> Date: Wed, 30 Oct 2013 21:19:33 +0000 From: Stefano Lattarini MIME-Version: 1.0 To: Dave Reisner Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P References: <20131030164235.GK735@rampage> In-Reply-To: <20131030164235.GK735@rampage> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15759 Cc: 15759@debbugs.gnu.org, 15758@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) merge 15758 15759 stop bug#15758 is the same as bug#15759, so I'm merging them, to avoid confusion or the risk of dispersing the discussion. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 11:26:40 2013 Received: (at 15759) by debbugs.gnu.org; 31 Oct 2013 15:26:40 +0000 Received: from localhost ([127.0.0.1]:54962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbu8t-0002vU-Vw for submit@debbugs.gnu.org; Thu, 31 Oct 2013 11:26:40 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:52644) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbu8q-0002vA-FH; Thu, 31 Oct 2013 11:26:37 -0400 Received: by mail-pd0-f178.google.com with SMTP id x10so2511493pdj.23 for ; Thu, 31 Oct 2013 08:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ABxPVd3AZSY1sUlmLbxC3NACcEtTJQgPyF30L3ecBzw=; b=QXf5drlIADYqQwKuGbzDewvobXN6tD6IVykLDM1zKtnc6EMd2XBv2khtw3PuiTAbu6 asAEpFAiQF956UfiSH8r+oOC/pqyoCVvCx22gFLoKulUvTrcYWxNMiS2sSobjoGUxGa8 s1A8Xn6FmIp7J+N6OEN5oQbfFYHGoPwgT1Ii6ppI+U6RtitkpIhAW7fcMwQ+8juBGtON QgLePRGmWG1GmzZp+kp6cXSZjoPnyoQiaUBBoIHbg+al04pwI6Z5Qqx7IW9DWnbql0FT JBhKGxsDQ2429VvFOzaoVrYs0Sn7pxanCzP0VywznPQHfkc1/9241113xS+pTlDCsbQM TGVQ== X-Received: by 10.68.225.164 with SMTP id rl4mr2559114pbc.100.1383233190322; Thu, 31 Oct 2013 08:26:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.6.66 with HTTP; Thu, 31 Oct 2013 08:26:10 -0700 (PDT) In-Reply-To: <527177E5.1090600@gmail.com> References: <20131030164235.GK735@rampage> <527177E5.1090600@gmail.com> From: Jim Meyering Date: Thu, 31 Oct 2013 08:26:10 -0700 X-Google-Sender-Auth: KaxEvFldlXySreV9vHbqcro81XM Message-ID: Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P To: Stefano Lattarini Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15759 Cc: 15759@debbugs.gnu.org, 15758@debbugs.gnu.org, Dave Reisner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > bug#15758 is the same as bug#15759, so I'm merging them, > to avoid confusion or the risk of dispersing the discussion. Thanks, Stefano and Dave. With this and the nit about --version output being wrong, I now have two reasons to make a new release. I will take a look at the mass of PCRE_ERROR* cases today. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 19:06:23 2013 Received: (at 15759) by debbugs.gnu.org; 2 Nov 2013 23:06:24 +0000 Received: from localhost ([127.0.0.1]:60128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VckGs-0001vB-NZ for submit@debbugs.gnu.org; Sat, 02 Nov 2013 19:06:23 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:62665) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VckGo-0001uo-NI; Sat, 02 Nov 2013 19:06:20 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb1so5523521pad.9 for ; Sat, 02 Nov 2013 16:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HpqJsyudsRjfkFxHuzW7cZ/gXiTRS6v6NGRHJvbOK1Y=; b=TyxnrpTfQ4g4d7qAAIBR6gLLUA8EK18iE1OgMsT8E87TnlSajyEvKNnZ+Q8q+YolZp zLq8BZht+K9YxLsjTEv0gVFVGh86zvxxszwVT83epiO/qhXEUNhaca1rYzC5I9HE2RjQ zFUWxB+WPn9kvVwFW2VON3mmvHFm+K8uZApcjG10funjQvjIaaKhqCycWL0squlpjL/r SiRiVo1UomnA/HD01lyjc7CBH5kexG9NE73A7rT5PCIarYTYV/iNE22eKpYqu3SuMfG7 d3eQxARaxlf89zSG8/Hv8+v1pnsvTFusULRoRaTPH4VJL0zKTVY5kWEJQUWj42xc5uWc ytcQ== X-Received: by 10.66.145.40 with SMTP id sr8mr3830588pab.60.1383433572563; Sat, 02 Nov 2013 16:06:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.6.66 with HTTP; Sat, 2 Nov 2013 16:05:52 -0700 (PDT) In-Reply-To: References: <20131030164235.GK735@rampage> <527177E5.1090600@gmail.com> From: Jim Meyering Date: Sat, 2 Nov 2013 16:05:52 -0700 X-Google-Sender-Auth: _OD8Fdwg__vtucjAu-qSUYEXXV0 Message-ID: Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P To: Stefano Lattarini Content-Type: multipart/mixed; boundary=047d7b6da6f2ab15e804ea39bad7 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15759 Cc: 15759@debbugs.gnu.org, 15758@debbugs.gnu.org, Dave Reisner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --047d7b6da6f2ab15e804ea39bad7 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 31, 2013 at 8:26 AM, Jim Meyering wrote: ... > With this and the nit about --version output being wrong, I now have > two reasons to make a new release. Thanks again for the report, Dave. Here's the fix I expect to push: --047d7b6da6f2ab15e804ea39bad7 Content-Type: text/plain; charset=US-ASCII; name="k.txt" Content-Disposition: attachment; filename="k.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hnjgjwkd0 RnJvbSA5YTliNGM1OWJhYmM2MGUxNWE3OWNmN2RiODE2N2Q0MmU2OGU0NGI5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog U2F0LCAyIE5vdiAyMDEzIDEyOjE1OjQ4IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gZ3JlcDogZml4 IHJlZ3Jlc3Npb24gd2l0aCAtUCB2cy4gaW52YWxpZCBVVEYtOCBpbnB1dAoKKiBzcmMvcGNyZXNl YXJjaC5jIChQZXhlY3V0ZSk6IERvbid0IGFib3J0IHVwb24gdW5leHBlY3RlZApQQ1JFLXNwZWNp ZmljIGVycm9yIGNvZGUuICBFeHBsaWNpdGx5IGhhbmRsZSBQQ1JFX0VSUk9SX0JBRFVURjgsCmFu ZCBjaGFuZ2UgdGhlIGRlZmF1bHQgdG8gcHJpbnQgYSBkaWFnbm9zdGljIGluY2x1ZGluZyB0aGUg dW5oYW5kbGVkCmludGVnZXIgUENSRSBlcnJvciBjb2RlIGFuZCBleGl0IHdpdGggc3RhdHVzIDIu CiogdGVzdHMvcGNyZS1pbnZhbGlkLXV0ZjgtaW5wdXQ6IE5ldyBmaWxlLgoqIHRlc3RzL01ha2Vm aWxlLmFtIChURVNUUyk6IEFkZCBpdC4KKiBORVdTIChCdWcgZml4ZXMpOiBNZW50aW9uIGl0Lgoq IFRIQU5LUzogVXBkYXRlLgpSZXBvcnRlZCBieS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XBlbmRfIC4uL3Ny YworcmVxdWlyZV9wY3JlXworcmVxdWlyZV9lbl91dGY4X2xvY2FsZV8KKworZmFpbD0wCisKK3By aW50ZiAnXDIwMlxuJyA+IGluIHx8IGZyYW1ld29ya19mYWlsdXJlXworcHJpbnRmICdncmVwOiBp bnZhbGlkIFVURi04IGJ5dGUgc2VxdWVuY2UgaW4gaW5wdXRcbicgXAorICAgPiBleHAtZXJyIHx8 IGZyYW1ld29ya19mYWlsdXJlXworCitMQ19BTEw9ZW5fVVMuVVRGLTggZ3JlcCAtUCBhbnl0aGlu ZyBpbiA+IG91dCAyPiBlcnIKK3Rlc3QgJD8gPSAyIHx8IGZhaWw9MQorY29tcGFyZSAvZGV2L251 bGwgb3V0IHx8IGZhaWw9MQorY29tcGFyZSBleHAtZXJyIGVyciB8fCBmYWlsPTEKKworRXhpdCAk ZmFpbAotLSAKMS44LjUucmMwLjIzLmdhYTI3MDY0Cgo= --047d7b6da6f2ab15e804ea39bad7-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 14:38:52 2013 Received: (at 15759) by debbugs.gnu.org; 4 Nov 2013 19:38:52 +0000 Received: from localhost ([127.0.0.1]:34592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdPz9-00041B-O7 for submit@debbugs.gnu.org; Mon, 04 Nov 2013 14:38:52 -0500 Received: from mail-qe0-f53.google.com ([209.85.128.53]:39431) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdPz6-00040V-UK for 15759@debbugs.gnu.org; Mon, 04 Nov 2013 14:38:49 -0500 Received: by mail-qe0-f53.google.com with SMTP id cy11so4359720qeb.40 for <15759@debbugs.gnu.org>; Mon, 04 Nov 2013 11:38:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=ff4gMBrWNzJ+L3wDb2kPliGR0JH9U2OPF6As9qC2AjY=; b=ISbduqHe+gknQHdyblUrw/6GMOMg2df6g4EeFZDchnLivkP54ANmn0eDSdihx4Zn41 qBzpnXpNzYnuZ298FfAZVj4LlPZiNt2hHEKbH8prNYSEA6gcdOtvvofyPyMHhsD7uDku SJ6lYC358/TiLcqS4F1PFo6qxl29EsEgiT47xdy0yMK6Df9uK94VpQ+SHePiuMjcOuvI koCci+Wu/NfrNIi9uEHeA6YxEdr2pPjmxqP71wJSzkV5yBGu4gQ/ERz/N39EAUq6EMKA 6fB7vqDLdDfIw9ZWufGSxHieXKQRmKL4L6Y52Htp9Lagb6TwFY1yMK1kWAs6LJczM/bv wyTQ== X-Gm-Message-State: ALoCoQl4Rakn0wG479Yy4JZQgiI72OB/gvUjsP+iYVH9Ew15M4LRR+bdP4hRH2XClOAFtNC6SH1Q X-Received: by 10.224.92.81 with SMTP id q17mr24584903qam.51.1383593923512; Mon, 04 Nov 2013 11:38:43 -0800 (PST) Received: from localhost (ool-4a588d72.dyn.optonline.net. [74.88.141.114]) by mx.google.com with ESMTPSA id x10sm58163023qas.5.2013.11.04.11.38.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2013 11:38:42 -0800 (PST) Date: Mon, 4 Nov 2013 14:38:40 -0500 From: Dave Reisner To: Jim Meyering Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P Message-ID: <20131104193840.GU735@rampage> References: <20131030164235.GK735@rampage> <527177E5.1090600@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15759 Cc: 15759@debbugs.gnu.org, 15758@debbugs.gnu.org, Dave Reisner , Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Nov 02, 2013 at 04:05:52PM -0700, Jim Meyering wrote: > On Thu, Oct 31, 2013 at 8:26 AM, Jim Meyering wrote: > ... > > With this and the nit about --version output being wrong, I now have > > two reasons to make a new release. > > Thanks again for the report, Dave. > Here's the fix I expect to push: Thanks Jim. Apologies for not responding to this sooner. I tested your patch and can confirm that the behavior is better, but the new behavior still seems like a regression. Take, for example, the simple instance of grep'ing grep's own git repo. # with grep 2.14 $ grep -rPw GNULIB gnulib/m4/bison.m4:dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB gnulib/lib/glob.c: HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB. */ gnulib/lib/netdb.in.h: GNULIB getaddrinfo() replacement, so are not yet needed. gnulib/lib/argp.h:/* GNULIB makes sure both program_invocation_name and # with grep built from HEAD $ ./src/grep -rPw GNULIB ./src/grep: invalid UTF-8 byte sequence in input I would expect that the invalid UTF-8 wouldn't stop grep cold, but continue on, ignoring the non-matching data, just as grep without the -P flag does. Cheers, Dave From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 05 11:17:49 2013 Received: (at 15759) by debbugs.gnu.org; 5 Nov 2013 16:17:49 +0000 Received: from localhost ([127.0.0.1]:35955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdjK9-00058d-4A for submit@debbugs.gnu.org; Tue, 05 Nov 2013 11:17:49 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:53219) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdjK5-000588-AG; Tue, 05 Nov 2013 11:17:46 -0500 Received: by mail-pa0-f42.google.com with SMTP id kp14so9078886pab.29 for ; Tue, 05 Nov 2013 08:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=U5G/xDY78UcbZgPSJqc3IoJk321qHzedq+NOOrf6hdU=; b=z0mcGBAOR8FPI1hkFgzc+vEVXp7vdq0I5jXi0e7n7uODh6X7HGI2/4PjgswFya7BZI tkhEIENhdlUhRkLGQWBp7ufOuxrn9AAbc9oZ1XKCTN4XKm0peEGIP7TKuvVmkliWY1kR AbsFCd3EH1/kBOBNDPGE4TrYragtm8WOzKDBUcKGCxq+t3wewGR14zwApWcXpjKFAFxq js6zHPRP4R+FHVBBjRvQSC2E00IKSpEE+EtXbH5mxzpkR9eJHUQtWNIvyp+mEchR3C5w TbnEmtp+2vAgqN46N9M/LtvJUm06hldcPo4mxpYLtTSyUU4HQI8DSB6hLCp1Elom9S+K DriA== X-Received: by 10.68.166.3 with SMTP id zc3mr23900551pbb.95.1383668258898; Tue, 05 Nov 2013 08:17:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.6.66 with HTTP; Tue, 5 Nov 2013 08:17:15 -0800 (PST) In-Reply-To: <20131104193840.GU735@rampage> References: <20131030164235.GK735@rampage> <527177E5.1090600@gmail.com> <20131104193840.GU735@rampage> From: Jim Meyering Date: Tue, 5 Nov 2013 08:17:15 -0800 X-Google-Sender-Auth: 2ROPe5cU_xShcbGebPAQWnQ0wKc Message-ID: Subject: Re: bug#15758: grep 2.15 calls abort() on larger searches with -P To: Dave Reisner Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15759 Cc: 15759@debbugs.gnu.org, 15758@debbugs.gnu.org, Dave Reisner , Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Nov 4, 2013 at 11:38 AM, Dave Reisner wrote: > On Sat, Nov 02, 2013 at 04:05:52PM -0700, Jim Meyering wrote: >> On Thu, Oct 31, 2013 at 8:26 AM, Jim Meyering wrote: >> ... >> > With this and the nit about --version output being wrong, I now have >> > two reasons to make a new release. >> >> Thanks again for the report, Dave. >> Here's the fix I expect to push: > > Thanks Jim. > > Apologies for not responding to this sooner. I tested your patch and can > confirm that the behavior is better, but the new behavior still seems > like a regression. Take, for example, the simple instance of grep'ing > grep's own git repo. > > # with grep 2.14 > $ grep -rPw GNULIB > gnulib/m4/bison.m4:dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB > gnulib/lib/glob.c: HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB. */ > gnulib/lib/netdb.in.h: GNULIB getaddrinfo() replacement, so are not yet needed. > gnulib/lib/argp.h:/* GNULIB makes sure both program_invocation_name and > > # with grep built from HEAD > $ ./src/grep -rPw GNULIB > ./src/grep: invalid UTF-8 byte sequence in input > > I would expect that the invalid UTF-8 wouldn't stop grep cold, but > continue on, ignoring the non-matching data, just as grep without the -P > flag does. Hi Dave, I agree, and so does pcregrep. There are a few other problems with grep's PCRE driver code: for example, a problem (no matter how serious) in one file should not cause the entire grep run to exit; grep should continue processing remaining files. And when grep reports the problem, it should include at least the file name in the diagnostic. I will fix those before the upcoming snapshot. Thanks, Jim From unknown Sat Jun 21 03:30:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 20 Feb 2014 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator