Paul Eggert <eggert@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Paul Eggert <eggert@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Paul Eggert <eggert@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 32806) by debbugs.gnu.org; 22 Sep 2018 21:23:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 22 17:23:50 2018 Received: from localhost ([127.0.0.1]:49971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1g3pNW-0005Bf-7w for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 17:23:50 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1g3pNU-0005BS-2u for 32806 <at> debbugs.gnu.org; Sat, 22 Sep 2018 17:23:48 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BF7EA161489; Sat, 22 Sep 2018 14:23:42 -0700 (PDT) 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 CVnId95ezk5v; Sat, 22 Sep 2018 14:23:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A7F4F1615A6; Sat, 22 Sep 2018 14:23:41 -0700 (PDT) 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 3absxcNFl342; Sat, 22 Sep 2018 14:23:41 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 89231161489; Sat, 22 Sep 2018 14:23:41 -0700 (PDT) Subject: Re: bug#32806: An assertion is hit when processing "(|()()0)\2" extended regular expression To: Anatoly Trosinenko <anatoly.trosinenko@HIDDEN>, 32806 <at> debbugs.gnu.org References: <CAE5jQCeQOMmvKAH8CC8GVWwPiCbcCef1YXZ+far1_GjQDb-5HA@HIDDEN> From: Paul Eggert <eggert@HIDDEN> Openpgp: preference=signencrypt Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBB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sFN7cXWtkGoi8b uNcby4U= Organization: UCLA Computer Science Department Message-ID: <b6f374f1-39ed-e442-4931-a84d3a0db577@HIDDEN> Date: Sat, 22 Sep 2018 14:23:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <CAE5jQCeQOMmvKAH8CC8GVWwPiCbcCef1YXZ+far1_GjQDb-5HA@HIDDEN> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32806 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Thanks for the test case. This appears to be the same as bug#22793 so I'll merge them. https://debbugs.gnu.org/22793
bug-grep@HIDDEN
:bug#32806
; Package grep
.
Full text available.Received: (at submit) by debbugs.gnu.org; 22 Sep 2018 15:20:18 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 22 11:20:18 2018 Received: from localhost ([127.0.0.1]:49761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1g3jhi-0004lX-Ef for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 11:20:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPJ-0004Fs-F8 for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 11:01:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPD-0004cp-C2 for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 11:01:12 -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.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56064) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPD-0004ca-7N for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 11:01:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPC-0005EG-73 for bug-grep@HIDDEN; Sat, 22 Sep 2018 11:01:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPB-0004b2-DU for bug-grep@HIDDEN; Sat, 22 Sep 2018 11:01:10 -0400 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:35562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <anatoly.trosinenko@HIDDEN>) id 1g3jPB-0004Zo-4f for bug-grep@HIDDEN; Sat, 22 Sep 2018 11:01:09 -0400 Received: by mail-oi0-x243.google.com with SMTP id m11-v6so13781995oic.2 for <bug-grep@HIDDEN>; Sat, 22 Sep 2018 08:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=n9lby8gc/VFPjwJ5MVfx9bmcmVuDmnyWBX1hEgfErks=; b=Dw8smF2yWssphYMsDpvhc/QoCo4+5ArGFrhsL7s2BNi6NjdOCtUYGJKr3hV8QjAv8g EYitKJpuFiqEOOSW9dLb86vmWPMHoc/B4bmPm1ZJcGganfl0Uizdjcl9+A1RwzDCKD/5 Im+ghXoZ1eOZacExerOBseV8+Uw9hRexWBrcMrzrL7PVDFGyomnTTq++yx/AszF0ZzSi OQs8udqUDBBQGApPE/dKNsSS4fHJ8PW5ec1HRbChE+CECR3pGAQM03j0fxuNR91wR61m rqtQ0jRbuNNHRHAJ5AReFT2prRM5Ekr1A/OjrgThsp1OaeRCLySNV7As4k8luupfALrd kxOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=n9lby8gc/VFPjwJ5MVfx9bmcmVuDmnyWBX1hEgfErks=; b=OviaMIjYX+cnWHJ9itkfkN6/HfUh1znmPUo7wRFkWtjd8mtuDEGJ3rlSEFmPfK4HTz t2fEt6xLk0sGm4IwQe3vmD1u8bbOQirQ4k1jYMuFcUYCI3xRkIshan2nOwlGxz9SG3eu xEjVWg28MkfGUtwtuJxcU6rU/QF+FGv5xVAWfPSzqX45JT3EbyT0URwMFL/o0D3eO4Uc wb6okt7ZGWmk8oeNduo0gggYMvYwE+8+YcPK1nuZ/D1087YkNvZOmp45it9b5y6LqeVw nCkucIxV8tLDXgBeOFZQUdKUjQFrFYoA3UQuZMzTQWMZE2Pl0h92CGFG80byJtiMtfVc CaLA== X-Gm-Message-State: APzg51DtC56sF9UD+S8rj42HQB9WU+fm0sP2o7GOtQHiy60FdahN/wd9 ZzcTPsHrmB3lWIUbZnJTTJESTF8Vqrht9wyHrPocmF7U X-Google-Smtp-Source: ANB0VdY1+2qhUlXL6PaBQSvK5ZyRVK3Uhv9PT5fvGMb9zlqTRG7EmPfW2zJwijJOhbj1lsFst0tgDO416ROEk1ApjYE= X-Received: by 2002:aca:3110:: with SMTP id x16-v6mr1304252oix.126.1537628467932; Sat, 22 Sep 2018 08:01:07 -0700 (PDT) MIME-Version: 1.0 From: Anatoly Trosinenko <anatoly.trosinenko@HIDDEN> Date: Sat, 22 Sep 2018 18:00:56 +0300 Message-ID: <CAE5jQCeQOMmvKAH8CC8GVWwPiCbcCef1YXZ+far1_GjQDb-5HA@HIDDEN> Subject: An assertion is hit when processing "(|()()0)\2" extended regular expression To: bug-grep@HIDDEN Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 22 Sep 2018 11:20:14 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) Hello, When processing a simple extended regular expression, GNU grep hits an assertion. This is reproducible on the latest commit from master branch 51dacfb (Sep 19). $ export LC_ALL=C $ gdb -q --args ./grep -E "(|()()0)\2" Reading symbols from ./grep...(no debugging symbols found)...done. (gdb) r Starting program: /path/to/grep -E \(\|\(\)\(\)0\)\\2 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". grep: regexec.c:1342: pop_fail_stack: Assertion `num >= 0' failed. Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff75ae801 in __GI_abort () at abort.c:79 #2 0x00007ffff759e39a in __assert_fail_base (fmt=0x7ffff77257d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff772351f "num >= 0", file=file@entry=0x7ffff7723515 "regexec.c", line=line@entry=1342, function=function@entry=0x7ffff77278a0 <__PRETTY_FUNCTION__.12590> "pop_fail_stack") at assert.c:92 #3 0x00007ffff759e412 in __GI___assert_fail (assertion=assertion@entry=0x7ffff772351f "num >= 0", file=file@entry=0x7ffff7723515 "regexec.c", line=line@entry=1342, function=function@entry=0x7ffff77278a0 <__PRETTY_FUNCTION__.12590> "pop_fail_stack") at assert.c:101 #4 0x00007ffff758f3f8 in pop_fail_stack (eps_via_nodes=0x7fffffffd5d0, regs=0x55555578b110, nregs=4, pidx=<optimized out>, fs=<optimized out>) at regexec.c:1342 #5 0x00007ffff76650e8 in pop_fail_stack (eps_via_nodes=<optimized out>, regs=<optimized out>, nregs=<optimized out>, pidx=<optimized out>, fs=<optimized out>) at regexec.c:1427 #6 set_regs (preg=preg@entry=0x555555788cd0, mctx=mctx@entry=0x7fffffffd770, nmatch=nmatch@entry=4, pmatch=pmatch@entry=0x55555578b110, fl_backtrack=<optimized out>) at regexec.c:1419 #7 0x00007ffff766e272 in re_search_internal (preg=preg@entry=0x555555788cd0, string=string@entry=0x7fffffffdbe6 "\n", length=length@entry=0, start=<optimized out>, start@entry=0, range=<optimized out>, range@entry=0, stop=stop@entry=0, nmatch=4, pmatch=0x55555578b110, eflags=0) at regexec.c:846 #8 0x00007ffff766eb88 in re_search_stub (bufp=0x555555788cd0, string=<optimized out>, length=<optimized out>, start=0, range=<optimized out>, stop=<optimized out>, regs=0x5555557883a0, ret_len=<optimized out>) at regexec.c:420 #9 0x00007ffff766f7e0 in __re_search (bufp=<optimized out>, string=<optimized out>, length=<optimized out>, start=<optimized out>, range=<optimized out>, regs=<optimized out>) at regexec.c:291 #10 0x0000555555558857 in EGexecute () #11 0x000055555555df08 in main () Best regards Anatoly
Anatoly Trosinenko <anatoly.trosinenko@HIDDEN>
:bug-grep@HIDDEN
.
Full text available.bug-grep@HIDDEN
:bug#32806
; Package grep
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.