From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 20 14:14:01 2014 Received: (at submit) by debbugs.gnu.org; 20 Dec 2014 19:14:01 +0000 Received: from localhost ([127.0.0.1]:53303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2PTT-0007TQ-UQ for submit@debbugs.gnu.org; Sat, 20 Dec 2014 14:14:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53169) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2GlG-0007Ux-Fm for submit@debbugs.gnu.org; Sat, 20 Dec 2014 04:55:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2GlA-00089d-AV for submit@debbugs.gnu.org; Sat, 20 Dec 2014 04:55:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2GlA-00089S-0Z for submit@debbugs.gnu.org; Sat, 20 Dec 2014 04:55:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Gl4-0003GY-2S for bug-grep@gnu.org; Sat, 20 Dec 2014 04:55:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2Gky-000867-K6 for bug-grep@gnu.org; Sat, 20 Dec 2014 04:55:33 -0500 Received: from lb1-smtp-cloud3.xs4all.net ([194.109.24.22]:43181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2Gky-00085v-Af for bug-grep@gnu.org; Sat, 20 Dec 2014 04:55:28 -0500 Received: from [192.168.0.130] ([82.95.251.247]) by smtp-cloud3.xs4all.net with ESMTP id VlvQ1p0095M1KXW01lvR8U; Sat, 20 Dec 2014 10:55:26 +0100 Message-ID: <5495478C.9090303@linformatronics.nl> Date: Sat, 20 Dec 2014 10:55:24 +0100 From: "J.P. Hendrix" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: bug-grep@gnu.org Subject: intermittent segfault using grep -P Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 20 Dec 2014 14:13:58 -0500 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: -5.0 (-----) When using the following command, *most* of the time I get a Segmentation fault (10 out of 16 times): € cat grepTxt | grep -P 'b(?:(?!tom).)+' Segmentation fault (core dumped) This happens with the grep version that came with my Linux installation: € grep -V grep (GNU grep) 2.16 I am on: NAME="Ubuntu" VERSION="14.04.1 LTS, Trusty Tahr" But also compiled grep from sources (http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz) with the same problem. libpcre3:amd64; libpcre3:i386; libpcre3-dev:amd64; libpcrecpp0:amd64 are all 1:8.31-2ubuntu2 I tried to reduce the regex and the text as much as possible to still reproduce the issue most of the time, unfortunately the text is still 16893 bytes long. As I don't know if it is OK to attach such a long file, I put it on pastebin, but will expire in a month. http://pastebin.com/download.php?i=jsHskMAA Please advise. Kind regards, JP From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 20 15:57:56 2014 Received: (at 19420) by debbugs.gnu.org; 20 Dec 2014 20:57:57 +0000 Received: from localhost ([127.0.0.1]:53315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2R64-0003NN-CY for submit@debbugs.gnu.org; Sat, 20 Dec 2014 15:57:56 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:51975) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2R61-0003NB-Kw for 19420@debbugs.gnu.org; Sat, 20 Dec 2014 15:57:54 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A00E5A60017; Sat, 20 Dec 2014 12:57:52 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0+LicdCuOgDM; Sat, 20 Dec 2014 12:57:44 -0800 (PST) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EF85939E80BC; Sat, 20 Dec 2014 12:57:43 -0800 (PST) Message-ID: <5495E2C7.1060508@cs.ucla.edu> Date: Sat, 20 Dec 2014 12:57:43 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "J.P. Hendrix" , 19420@debbugs.gnu.org Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495478C.9090303@linformatronics.nl> In-Reply-To: <5495478C.9090303@linformatronics.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 19420 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: -2.3 (--) I can't reproduce the problem on Ubuntu 14.10 (x86-64) or Fedora 20 (x86-64), with either the bundled grep or with GNU grep 2.21. What locale are you running in? What's the output of the 'locale' command? It could be a bug in grep, or in libpcre, or somewhere else. Ubuntu 14.10 is running libpcre3 1:8.35-3ubuntu1. I vaguely recall that they're doing something funky to prevent grep from depending on libpcre while still supporting -P, but I don't recall the details. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 20 15:59:58 2014 Received: (at 19420) by debbugs.gnu.org; 20 Dec 2014 20:59:58 +0000 Received: from localhost ([127.0.0.1]:53319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2R82-0003SX-2X for submit@debbugs.gnu.org; Sat, 20 Dec 2014 15:59:58 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:52075) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2R7z-0003SL-Hp for 19420@debbugs.gnu.org; Sat, 20 Dec 2014 15:59:55 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id E6A3DA60033; Sat, 20 Dec 2014 12:59:54 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VuTe433fD5xL; Sat, 20 Dec 2014 12:59:46 -0800 (PST) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 50F7CA60017; Sat, 20 Dec 2014 12:59:46 -0800 (PST) Message-ID: <5495E341.1000000@cs.ucla.edu> Date: Sat, 20 Dec 2014 12:59:45 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "J.P. Hendrix" , 19420@debbugs.gnu.org Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495478C.9090303@linformatronics.nl> <5495E2C7.1060508@cs.ucla.edu> In-Reply-To: <5495E2C7.1060508@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 19420 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: -2.3 (--) One more thing. It's odd that you get a segfault only 10 times out of 16. So another possibility is that you have a hardware problem. Can you reproduce the bug on some other machine? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 20 19:56:42 2014 Received: (at 19420) by debbugs.gnu.org; 21 Dec 2014 00:56:42 +0000 Received: from localhost ([127.0.0.1]:53342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2Up8-0001di-4B for submit@debbugs.gnu.org; Sat, 20 Dec 2014 19:56:42 -0500 Received: from mailgw01.kcn.ne.jp ([61.86.7.208]:51874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2Up5-0001dW-Db for 19420@debbugs.gnu.org; Sat, 20 Dec 2014 19:56:40 -0500 Received: from imp01 (mailgw5.kcn.ne.jp [61.86.15.231]) by mailgw01.kcn.ne.jp (Postfix) with ESMTP id 3AC0580328 for <19420@debbugs.gnu.org>; Sun, 21 Dec 2014 09:56:36 +0900 (JST) Received: from mail02.kcn.ne.jp ([61.86.6.181]) by imp01 with bizsmtp id W0wc1p0043uLcVp010wc3H; Sun, 21 Dec 2014 09:56:36 +0900 X-OrgRCPT: 19420@debbugs.gnu.org Received: from [10.120.1.73] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail02.kcn.ne.jp (Postfix) with ESMTPA id E801FF10025; Sun, 21 Dec 2014 09:56:35 +0900 (JST) Date: Sun, 21 Dec 2014 09:56:38 +0900 From: Norihiro Tanaka To: Paul Eggert Subject: Re: bug#19420: intermittent segfault using grep -P In-Reply-To: <5495E341.1000000@cs.ucla.edu> References: <5495E2C7.1060508@cs.ucla.edu> <5495E341.1000000@cs.ucla.edu> Message-Id: <20141221095637.74B1.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 19420 Cc: 19420@debbugs.gnu.org, "J.P. Hendrix" 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 (/) In addition, please recompile grep with `-g' and if it is reproduced, get backtrace from a core file with gdb and send it to us. $ CFLAGS=-g ./configure OPTIONS $ make $ cat grepTxt | grep -P 'b(?:(?!tom).)+' $ gdb src/grep core.* (gdb) bt From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 21 05:33:26 2014 Received: (at 19420) by debbugs.gnu.org; 21 Dec 2014 10:33:26 +0000 Received: from localhost ([127.0.0.1]:53435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2dpE-0007lt-Vz for submit@debbugs.gnu.org; Sun, 21 Dec 2014 05:33:26 -0500 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]:50675) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2dpB-0007lk-SX for 19420@debbugs.gnu.org; Sun, 21 Dec 2014 05:33:23 -0500 Received: from [192.168.0.130] ([82.95.251.247]) by smtp-cloud6.xs4all.net with ESMTP id WAZH1p00C5M1KXW01AZKsw; Sun, 21 Dec 2014 11:33:20 +0100 Message-ID: <5496A1ED.6040207@linformatronics.nl> Date: Sun, 21 Dec 2014 11:33:17 +0100 From: "J.P. Hendrix" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Paul Eggert , 19420@debbugs.gnu.org, noritnk@kcn.ne.jp Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495478C.9090303@linformatronics.nl> <5495E2C7.1060508@cs.ucla.edu> In-Reply-To: <5495E2C7.1060508@cs.ucla.edu> Content-Type: multipart/alternative; boundary="------------050300030103000301060001" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19420 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 (/) This is a multi-part message in MIME format. --------------050300030103000301060001 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit My feedback to your questions: In addition, please recompile grep with `-g' and if it is reproduced, get backtrace from a core file with gdb and send it to us. $ CFLAGS=-g ./configure OPTIONS $ make $ cat grepTxt | grep -P 'b(?:(?!tom).)+' $ gdb src/grep core.* (gdb) bt Recompiling *# **Core files are not dumped by default, enabling that.* € ulimit -c unlimited € ulimit -a core file size (blocks, -c) unlimited ... *# Fresh compile* € tar xf grep-2.21.tar # new fresh directory. € cd grep-2.21 € CFLAGS=-g ./configure --prefix=/tmp/segfaultGrep/grep/ ... € make ... € cat ../../grepTxt | ./src/grep -qP 'b(?:(?!tom).)+' ../bin/grep: warning: GREP_OPTIONS is deprecated; please use an alias or script Segmentation fault (core dumped) *# Only one core file is found, but not matching 'core.*'** **# I have no experience with gdb, so I cannot really judge gdb output** *€ find /tmp/segfaultGrep/ | grep -i core /tmp/segfaultGrep/grep/grep-2.21/core € gdb src/grep core GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 ... This GDB was configured as "x86_64-linux-gnu". ... Reading symbols from src/grep...done. [New LWP 1357] Core was generated by `./src/grep -qP b(?:(?!tom).)+'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fd8a278054a in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 (gdb) bt #0 0x00007fd8a278054a in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #1 0x00007fd8a2780ecb in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #2 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #3 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #4 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 ... #16890 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #16891 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #16892 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 #16893 0x00007fd8a2791221 in pcre_exec () from /lib/x86_64-linux-gnu/libpcre.so.3 #16894 0x000000000041621d in Pexecute ( buf=0x13fc000 "b3VuZDwvaDE+Iik7fQoKJGxhbmd1YWdlPSdlbmcnOwoKJGF1dGggPSAwOwoKJG5hbWU9Jyc7IAokcGFzcz0nJzsKCi8vcnVfUlUsIC8vcnVfUlUuY3AxMjUxLCAvL3J1X1JVLmlzbzg4NTk1LCAvL3J1X1JVLmtvaThyLCAvL3J1X1JVLnV0ZjgKQHNldGxvY2FsZShM"..., size=16893, match_size=0x7fffa0333150, start_ptr=0x0) at pcresearch.c:215 #16895 0x0000000000404b95 in grepbuf ( beg=0x13fc000 "b3VuZDwvaDE+Iik7fQoKJGxhbmd1YWdlPSdlbmcnOwoKJGF1dGggPSAwOwoKJG5hbWU9Jyc7IAokcGFzcz0nJzsKCi8vcnVfUlUsIC8vcnVfUlUuY3AxMjUxLCAvL3J1X1JVLmlzbzg4NTk1LCAvL3J1X1JVLmtvaThyLCAvL3J1X1JVLnV0ZjgKQHNldGxvY2FsZShM"..., lim=0x14001fd "\377") at grep.c:1232 #16896 0x0000000000404fcb in grep (fd=0, st=0x7fffa0333260) at grep.c:1350 #16897 0x0000000000405aad in grepdesc (desc=0, command_line=true) at grep.c:1639 #16898 0x0000000000405ca4 in grep_command_line_arg (arg=0x42440e "-") at grep.c:1686 #16899 0x000000000040774d in main (argc=4, argv=0x13fa080) at grep.c:2564 *# OK, I guess I know enough about gdb to understand we're missing symbols in the output ...* € sudo apt-get install libpcre3-dbg ... *# Working around almost 10 megabyte **output text...* € echo bt > bt € gdb src/grep core --batch -x bt > /tmp/gdb.out 484 pcre_exec.c: No such file or directory. *# http://wirespeed.xs4all.nl/media/segfaultGrep/* I checked on a VM on my laptop, but I can't reproduce the issue there. It is 32 bit Ubuntu 14.04.1 I double checked the intermittent behavior on my PC, don't have a reason to believe it is hardware related because my system is otherwise stable. I found these messages in 'dmesg' after checking the command couple times, notice the 'libpcre'. € dmesg [2119696.762373] grep[6488]: segfault at 7fff51de7fe8 ip 00007f5db8a3454a sp 00007fff51de7fe0 error 6 in *libpcre*.so.3.13.1[7f5db8a21000+3d000] [2119697.880722] grep[6569]: segfault at 7ffffcd28ff8 ip 00007f00ae1ea53d sp 00007ffffcd28e50 error 6 in libpcre.so.3.13.1[7f00ae1d7000+3d000] [2119698.811133] grep[6646]: segfault at 7fff6252fec8 ip 00007f0c7545754a sp 00007fff6252fec0 error 6 in libpcre.so.3.13.1[7f0c75444000+3d000] [2119699.674442] grep[6708]: segfault at 7fff5fdcdee8 ip 00007fb27fa3b54a sp 00007fff5fdcdee0 error 6 in libpcre.so.3.13.1[7fb27fa28000+3d000] [2119700.488632] grep[6770]: segfault at 7fff8fda7ff8 ip 00007f7791bc5ec6 sp 00007fff8fda8000 error 6 in libpcre.so.3.13.1[7f7791bb2000+3d000] [2119701.274100] grep[6822]: segfault at 7fff29bd8f18 ip 00007fb0bd44d54a sp 00007fff29bd8f10 error 6 in libpcre.so.3.13.1[7fb0bd43a000+3d000] [2119702.090632] grep[6890]: segfault at 7fffa33f8ee8 ip 00007fd4b786954a sp 00007fffa33f8ee0 error 6 in libpcre.so.3.13.1[7fd4b7856000+3d000] [2119702.875331] grep[6943]: segfault at 7fffb0b0efd8 ip 00007fc2a9d7554a sp 00007fffb0b0efd0 error 6 in libpcre.so.3.13.1[7fc2a9d62000+3d000] [2119715.819686] grep[7795]: segfault at 7fff20e78e68 ip 00007fd5162c854a sp 00007fff20e78e60 error 6 in libpcre.so.3.13.1[7fd5162b5000+3d000] [2119717.595114] grep[7913]: segfault at 7fff2bc21fd8 ip 00007f30455ec54a sp 00007fff2bc21fd0 error 6 in libpcre.so.3.13.1[7f30455d9000+3d000] I believe I mentioned libpcre3:amd64 1:8.*31*-2ubuntu2 before, but here it is for completeness. € locale LANG=en_US.UTF-8 LANGUAGE=en LC_CTYPE="en_US.UTF-8" LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=en_US.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL= On 2014-12-20 21:57, Paul Eggert wrote: > I can't reproduce the problem on Ubuntu 14.10 (x86-64) or Fedora 20 > (x86-64), with either the bundled grep or with GNU grep 2.21. > > What locale are you running in? What's the output of the 'locale' > command? > > It could be a bug in grep, or in libpcre, or somewhere else. Ubuntu > 14.10 is running libpcre3 1:8.35-3ubuntu1. I vaguely recall that > they're doing something funky to prevent grep from depending on > libpcre while still supporting -P, but I don't recall the details. > --------------050300030103000301060001 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit My feedback to your questions:
In addition, please recompile grep with `-g' and if it is reproduced,
get backtrace from a core file with gdb and send it to us.

  $ CFLAGS=-g ./configure OPTIONS
  $ make
  $ cat grepTxt | grep -P 'b(?:(?!tom).)+'
  $ gdb src/grep core.*

  (gdb) bt
Recompiling
# Core files are not dumped by default, enabling that.
€ ulimit -c unlimited
€ ulimit -a
core file size          (blocks, -c) unlimited
...

# Fresh compile
€ tar xf grep-2.21.tar       # new fresh directory.
€ cd grep-2.21
€ CFLAGS=-g ./configure --prefix=/tmp/segfaultGrep/grep/
...
€ make
...
€ cat ../../grepTxt | ./src/grep -qP 'b(?:(?!tom).)+'
../bin/grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Segmentation fault (core dumped)


# Only one core file is found, but not matching 'core.*'
# I have no experience with gdb, so I cannot really judge gdb output
€ find /tmp/segfaultGrep/ | grep -i core
/tmp/segfaultGrep/grep/grep-2.21/core
€ gdb src/grep core
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
...
This GDB was configured as "x86_64-linux-gnu".
...
Reading symbols from src/grep...done.
[New LWP 1357]
Core was generated by `./src/grep -qP b(?:(?!tom).)+'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fd8a278054a in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
(gdb) bt
#0  0x00007fd8a278054a in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#1  0x00007fd8a2780ecb in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#2  0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#3  0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#4  0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3

...
#16890 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#16891 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#16892 0x00007fd8a278dcfa in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
#16893 0x00007fd8a2791221 in pcre_exec () from /lib/x86_64-linux-gnu/libpcre.so.3
#16894 0x000000000041621d in Pexecute (
    buf=0x13fc000 "b3VuZDwvaDE+Iik7fQoKJGxhbmd1YWdlPSdlbmcnOwoKJGF1dGggPSAwOwoKJG5hbWU9Jyc7IAokcGFzcz0nJzsKCi8vcnVfUlUsIC8vcnVfUlUuY3AxMjUxLCAvL3J1X1JVLmlzbzg4NTk1LCAvL3J1X1JVLmtvaThyLCAvL3J1X1JVLnV0ZjgKQHNldGxvY2FsZShM"..., size=16893, match_size=0x7fffa0333150, start_ptr=0x0) at pcresearch.c:215
#16895 0x0000000000404b95 in grepbuf (
    beg=0x13fc000 "b3VuZDwvaDE+Iik7fQoKJGxhbmd1YWdlPSdlbmcnOwoKJGF1dGggPSAwOwoKJG5hbWU9Jyc7IAokcGFzcz0nJzsKCi8vcnVfUlUsIC8vcnVfUlUuY3AxMjUxLCAvL3J1X1JVLmlzbzg4NTk1LCAvL3J1X1JVLmtvaThyLCAvL3J1X1JVLnV0ZjgKQHNldGxvY2FsZShM"..., lim=0x14001fd "\377") at grep.c:1232
#16896 0x0000000000404fcb in grep (fd=0, st=0x7fffa0333260) at grep.c:1350
#16897 0x0000000000405aad in grepdesc (desc=0, command_line=true) at grep.c:1639
#16898 0x0000000000405ca4 in grep_command_line_arg (arg=0x42440e "-") at grep.c:1686
#16899 0x000000000040774d in main (argc=4, argv=0x13fa080) at grep.c:2564


# OK, I guess I know enough about gdb to understand we're missing symbols in the output ...
€ sudo apt-get install libpcre3-dbg
...

# Working around almost 10 megabyte output text...
€ echo bt > bt
€ gdb src/grep core --batch -x bt > /tmp/gdb.out
484     pcre_exec.c: No such file or directory.
# http://wirespeed.xs4all.nl/media/segfaultGrep/

I checked on a VM on my laptop, but I can't reproduce the issue there. It is 32 bit Ubuntu 14.04.1

I double checked the intermittent behavior on my PC, don't have a reason to believe it is hardware related because my system is otherwise stable. I found these messages in 'dmesg' after checking the command couple times, notice the 'libpcre'.

€ dmesg
[2119696.762373] grep[6488]: segfault at 7fff51de7fe8 ip 00007f5db8a3454a sp 00007fff51de7fe0 error 6 in libpcre.so.3.13.1[7f5db8a21000+3d000]
[2119697.880722] grep[6569]: segfault at 7ffffcd28ff8 ip 00007f00ae1ea53d sp 00007ffffcd28e50 error 6 in libpcre.so.3.13.1[7f00ae1d7000+3d000]
[2119698.811133] grep[6646]: segfault at 7fff6252fec8 ip 00007f0c7545754a sp 00007fff6252fec0 error 6 in libpcre.so.3.13.1[7f0c75444000+3d000]
[2119699.674442] grep[6708]: segfault at 7fff5fdcdee8 ip 00007fb27fa3b54a sp 00007fff5fdcdee0 error 6 in libpcre.so.3.13.1[7fb27fa28000+3d000]
[2119700.488632] grep[6770]: segfault at 7fff8fda7ff8 ip 00007f7791bc5ec6 sp 00007fff8fda8000 error 6 in libpcre.so.3.13.1[7f7791bb2000+3d000]
[2119701.274100] grep[6822]: segfault at 7fff29bd8f18 ip 00007fb0bd44d54a sp 00007fff29bd8f10 error 6 in libpcre.so.3.13.1[7fb0bd43a000+3d000]
[2119702.090632] grep[6890]: segfault at 7fffa33f8ee8 ip 00007fd4b786954a sp 00007fffa33f8ee0 error 6 in libpcre.so.3.13.1[7fd4b7856000+3d000]
[2119702.875331] grep[6943]: segfault at 7fffb0b0efd8 ip 00007fc2a9d7554a sp 00007fffb0b0efd0 error 6 in libpcre.so.3.13.1[7fc2a9d62000+3d000]
[2119715.819686] grep[7795]: segfault at 7fff20e78e68 ip 00007fd5162c854a sp 00007fff20e78e60 error 6 in libpcre.so.3.13.1[7fd5162b5000+3d000]
[2119717.595114] grep[7913]: segfault at 7fff2bc21fd8 ip 00007f30455ec54a sp 00007fff2bc21fd0 error 6 in libpcre.so.3.13.1[7f30455d9000+3d000]



I believe I mentioned libpcre3:amd64 1:8.31-2ubuntu2 before, but here it is for completeness.

€ locale
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=




On 2014-12-20 21:57, Paul Eggert wrote:
I can't reproduce the problem on Ubuntu 14.10 (x86-64) or Fedora 20 (x86-64), with either the bundled grep or with GNU grep 2.21.

What locale are you running in?  What's the output of the 'locale' command?

It could be a bug in grep, or in libpcre, or somewhere else.  Ubuntu 14.10 is running libpcre3 1:8.35-3ubuntu1.  I vaguely recall that they're doing something funky to prevent grep from depending on libpcre while still supporting -P, but I don't recall the details.


--------------050300030103000301060001-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 10:55:09 2014 Received: (at 19420) by debbugs.gnu.org; 22 Dec 2014 15:55:09 +0000 Received: from localhost ([127.0.0.1]:55067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y35K9-0004t0-2y for submit@debbugs.gnu.org; Mon, 22 Dec 2014 10:55:09 -0500 Received: from mailgw04.kcn.ne.jp ([61.86.7.211]:57968) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y35K5-0004so-3B for 19420@debbugs.gnu.org; Mon, 22 Dec 2014 10:55:06 -0500 Received: from imp01 (mailgw5.kcn.ne.jp [61.86.15.231]) by mailgw04.kcn.ne.jp (Postfix) with ESMTP id 560636C1C32 for <19420@debbugs.gnu.org>; Tue, 23 Dec 2014 00:55:02 +0900 (JST) Received: from mail08.kcn.ne.jp ([61.86.6.187]) by imp01 with bizsmtp id Wfv21p007426eXR01fv2Tb; Tue, 23 Dec 2014 00:55:02 +0900 X-OrgRCPT: 19420@debbugs.gnu.org Received: from [10.120.1.67] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail08.kcn.ne.jp (Postfix) with ESMTPA id 110F412B802E; Tue, 23 Dec 2014 00:55:02 +0900 (JST) Date: Tue, 23 Dec 2014 00:55:02 +0900 From: Norihiro Tanaka To: "J.P. Hendrix" Subject: Re: bug#19420: intermittent segfault using grep -P In-Reply-To: <5496A1ED.6040207@linformatronics.nl> References: <5495E2C7.1060508@cs.ucla.edu> <5496A1ED.6040207@linformatronics.nl> Message-Id: <20141223005501.1F34.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 19420 Cc: 19420@debbugs.gnu.org, Paul Eggert 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 (/) It could reproduce as following in Fedora21, RHEL 6.5. $ cd pcre-8.36 $ CFLAGS=-g ./configure --enable-utf --enable-unicode-properties $ make # make install grep-2.21 $ ./configure $ make # make install By the way, if we enabled to optimize or recompile pcre with --enable-jit option, it did not reproduced. However, I see that it is an issue in PRE side. It reproduces with following test case without grep frontend. == #include #include #include #include enum { LEN = 15000 }; enum { NSUB = 300 }; int main () { char *text = malloc ((LEN + 1) * sizeof *text); memset (text, '0', LEN); text[LEN] = '\0'; char const *re = "0(?:(?!foo).)+"; char const *ep; int eo; pcre *cre = pcre_compile (re, 0, &ep, &eo, NULL); if (!cre) exit (EXIT_FAILURE); int sub[NSUB]; pcre_exec (cre, NULL, text, strlen (text), 0, 0, sub, NSUB); exit (EXIT_SUCCESS); } == From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 16:32:40 2014 Received: (at 19420) by debbugs.gnu.org; 22 Dec 2014 21:32:40 +0000 Received: from localhost ([127.0.0.1]:55312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3Aal-0006RS-UN for submit@debbugs.gnu.org; Mon, 22 Dec 2014 16:32:40 -0500 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]:55078) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3Aaj-0006RI-DH for 19420@debbugs.gnu.org; Mon, 22 Dec 2014 16:32:38 -0500 Received: from [192.168.0.130] ([82.95.251.247]) by smtp-cloud6.xs4all.net with ESMTP id WlYZ1p00C5M1KXW01lYakJ; Mon, 22 Dec 2014 22:32:36 +0100 Message-ID: <54988DF1.3040906@linformatronics.nl> Date: Mon, 22 Dec 2014 22:32:33 +0100 From: "J.P. Hendrix" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Norihiro Tanaka Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495E2C7.1060508@cs.ucla.edu> <5496A1ED.6040207@linformatronics.nl> <20141223005501.1F34.27F6AC2D@kcn.ne.jp> In-Reply-To: <20141223005501.1F34.27F6AC2D@kcn.ne.jp> Content-Type: multipart/alternative; boundary="------------070000010309010809020607" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19420 Cc: 19420@debbugs.gnu.org, Paul Eggert 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 (/) This is a multi-part message in MIME format. --------------070000010309010809020607 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit I'm not a developer, so please bear with me here. You kinda lost me with below analysis, but I think I managed to reproduce your findings with a bit of Google-magic. Are you saying a bug should be registered with pcre.org? I am reproducing your findings as follows: € sudo apt-get install libpcre3-dbg libpcre3-dev # these were already installed. € tar xzf pcre-8.36.tar.gz € cd pcre-8.36 € CFLAGS=-g ./configure --enable-utf --enable-unicode-properties --prefix=/tmp/segfaultGrep € make € make install € gcc reproduce.c -L/tmp/segfaultGrep/lib -lpcre € LD_LIBRARY_PATH=/tmp/segfaultGrep/lib ./a.out; echo $? Segmentation fault (core dumped) 139 Please check my notes and advice how to go forward. Kind regards, JP On 2014-12-22 16:55, Norihiro Tanaka wrote: > It could reproduce as following in Fedora21, RHEL 6.5. > > $ cd pcre-8.36 > $ CFLAGS=-g ./configure --enable-utf --enable-unicode-properties > $ make > # make install > > grep-2.21 > $ ./configure > $ make > # make install > > By the way, if we enabled to optimize or recompile pcre with --enable-jit > option, it did not reproduced. > > However, I see that it is an issue in PRE side. It reproduces with > following test case without grep frontend. > > == > #include > #include > #include > #include > > enum { LEN = 15000 }; > enum { NSUB = 300 }; > > int > main () > { > char *text = malloc ((LEN + 1) * sizeof *text); > memset (text, '0', LEN); > text[LEN] = '\0'; > char const *re = "0(?:(?!foo).)+"; > char const *ep; > int eo; > > pcre *cre = pcre_compile (re, 0, &ep, &eo, NULL); > if (!cre) > exit (EXIT_FAILURE); > > int sub[NSUB]; > pcre_exec (cre, NULL, text, strlen (text), 0, 0, sub, NSUB); > > exit (EXIT_SUCCESS); > } > == > > --------------070000010309010809020607 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit I'm not a developer, so please bear with me here. You kinda lost me with below analysis, but I think I managed to reproduce your findings with a bit of Google-magic. Are you saying a bug should be registered with pcre.org?

I am reproducing your findings as follows:

€ sudo apt-get install libpcre3-dbg libpcre3-dev   # these were already installed.

€ tar xzf pcre-8.36.tar.gz
€ cd pcre-8.36
€ CFLAGS=-g ./configure --enable-utf --enable-unicode-properties --prefix=/tmp/segfaultGrep
€ make
€ make install


€ gcc reproduce.c -L/tmp/segfaultGrep/lib -lpcre
€ LD_LIBRARY_PATH=/tmp/segfaultGrep/lib ./a.out; echo $?
Segmentation fault (core dumped)
139

Please check my notes and advice how to go forward.

Kind regards,

JP



On 2014-12-22 16:55, Norihiro Tanaka wrote:
It could reproduce as following in Fedora21, RHEL 6.5.

$ cd pcre-8.36
$ CFLAGS=-g ./configure --enable-utf --enable-unicode-properties
$ make
# make install

grep-2.21
$ ./configure
$ make
# make install

By the way, if we enabled to optimize or recompile pcre with --enable-jit
option, it did not reproduced.

However, I see that it is an issue in PRE side.  It reproduces with
following test case without grep frontend.

==
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pcre.h>

enum { LEN = 15000 };
enum { NSUB = 300 };

int
main ()
{
  char *text = malloc ((LEN + 1) * sizeof *text);
  memset (text, '0', LEN);
  text[LEN] = '\0';
  char const *re = "0(?:(?!foo).)+";
  char const *ep;
  int eo;

  pcre *cre = pcre_compile (re, 0, &ep, &eo, NULL);
  if (!cre)
    exit (EXIT_FAILURE);

  int sub[NSUB];
  pcre_exec (cre, NULL, text, strlen (text), 0, 0, sub, NSUB);

  exit (EXIT_SUCCESS);
}
==



--------------070000010309010809020607-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 21:05:48 2014 Received: (at 19420) by debbugs.gnu.org; 23 Dec 2014 02:05:49 +0000 Received: from localhost ([127.0.0.1]:55397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3Er6-0006Rb-Ju for submit@debbugs.gnu.org; Mon, 22 Dec 2014 21:05:48 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:45994) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3Er3-0006RQ-Ka for 19420@debbugs.gnu.org; Mon, 22 Dec 2014 21:05:46 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id E356DA60042; Mon, 22 Dec 2014 18:05:44 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FQUoZy2mvr6G; Mon, 22 Dec 2014 18:05:36 -0800 (PST) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2CEA539E8015; Mon, 22 Dec 2014 18:05:36 -0800 (PST) Message-ID: <5498CDEF.70100@cs.ucla.edu> Date: Mon, 22 Dec 2014 18:05:35 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "J.P. Hendrix" , Norihiro Tanaka Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495E2C7.1060508@cs.ucla.edu> <5496A1ED.6040207@linformatronics.nl> <20141223005501.1F34.27F6AC2D@kcn.ne.jp> <54988DF1.3040906@linformatronics.nl> In-Reply-To: <54988DF1.3040906@linformatronics.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 19420 Cc: 19420@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: -2.3 (--) J.P. Hendrix wrote: > Are you saying a bug should be registered with pcre.org? That's what I'd suggest, yes. I also can reproduce the bug with Mr. Tanaka's recipe on CentOS 6.5 x86-64. Wow, that's pretty deep recursion that 'match' is doing.... From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 25 03:53:08 2014 Received: (at 19420) by debbugs.gnu.org; 25 Dec 2014 08:53:08 +0000 Received: from localhost ([127.0.0.1]:56900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y44AO-0005ho-1K for submit@debbugs.gnu.org; Thu, 25 Dec 2014 03:53:08 -0500 Received: from lb2-smtp-cloud3.xs4all.net ([194.109.24.26]:47394) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y44AL-0005he-49 for 19420@debbugs.gnu.org; Thu, 25 Dec 2014 03:53:06 -0500 Received: from [192.168.0.130] ([82.95.251.247]) by smtp-cloud3.xs4all.net with ESMTP id Xkt11p0095M1KXW01kt2k0; Thu, 25 Dec 2014 09:53:03 +0100 Message-ID: <549BD06D.6090308@linformatronics.nl> Date: Thu, 25 Dec 2014 09:53:01 +0100 From: "J.P. Hendrix" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Paul Eggert , Norihiro Tanaka Subject: Re: bug#19420: intermittent segfault using grep -P References: <5495E2C7.1060508@cs.ucla.edu> <5496A1ED.6040207@linformatronics.nl> <20141223005501.1F34.27F6AC2D@kcn.ne.jp> <54988DF1.3040906@linformatronics.nl> <5498CDEF.70100@cs.ucla.edu> In-Reply-To: <5498CDEF.70100@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19420 Cc: 19420@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.0 (/) FYI: I filed a bug with the pcre prject: http://bugs.exim.org/show_bug.cgi?id=1562 On 2014-12-23 03:05, Paul Eggert wrote: > J.P. Hendrix wrote: >> Are you saying a bug should be registered with pcre.org? > > That's what I'd suggest, yes. I also can reproduce the bug with Mr. > Tanaka's recipe on CentOS 6.5 x86-64. Wow, that's pretty deep > recursion that 'match' is doing.... > > From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 23 22:03:19 2021 Received: (at 19420-done) by debbugs.gnu.org; 24 Nov 2021 03:03:19 +0000 Received: from localhost ([127.0.0.1]:52662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpiZ5-0005Iy-Hb for submit@debbugs.gnu.org; Tue, 23 Nov 2021 22:03:19 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpiZ1-0005Id-KI for 19420-done@debbugs.gnu.org; Tue, 23 Nov 2021 22:03:18 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DD7681600BC; Tue, 23 Nov 2021 19:03:09 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5stEg5_byfg9; Tue, 23 Nov 2021 19:03:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 12B0E1600D3; Tue, 23 Nov 2021 19:03:09 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IUa0dn85KONX; Tue, 23 Nov 2021 19:03:08 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D2DA11600BC; Tue, 23 Nov 2021 19:03:08 -0800 (PST) Message-ID: <339e3eb7-0593-6279-11cf-1a5c227d55c7@cs.ucla.edu> Date: Tue, 23 Nov 2021 19:03:08 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#19420: intermittent segfault using grep -P Content-Language: en-US From: Paul Eggert To: "J.P. Hendrix" References: <5495E2C7.1060508@cs.ucla.edu> <5496A1ED.6040207@linformatronics.nl> <20141223005501.1F34.27F6AC2D@kcn.ne.jp> <54988DF1.3040906@linformatronics.nl> <5498CDEF.70100@cs.ucla.edu> Organization: UCLA Computer Science Department In-Reply-To: <5498CDEF.70100@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 19420-done Cc: 19420-done@debbugs.gnu.org, Norihiro Tanaka X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.4 (---) I'm closing this old Grep bug report, on two grounds: * I can no longer reproduce the the problem on Fedora 35 x86-64, using Norihiro Tanaka's test case . This suggests the PCRE library has been fixed. * GNU Grep has switched to PCRE2, so PCRE bugs shouldn't matter now. See . From unknown Tue Jun 17 01:50:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Dec 2021 12:24:05 +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