From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 10:53:25 2017 Received: (at submit) by debbugs.gnu.org; 26 Jul 2017 14:53:25 +0000 Received: from localhost ([127.0.0.1]:57526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daNgi-0000bq-VM for submit@debbugs.gnu.org; Wed, 26 Jul 2017 10:53:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daNgh-0000bd-ET for submit@debbugs.gnu.org; Wed, 26 Jul 2017 10:53:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daNgb-0004jf-DX for submit@debbugs.gnu.org; Wed, 26 Jul 2017 10:53:18 -0400 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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60265) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daNgb-0004jX-Am for submit@debbugs.gnu.org; Wed, 26 Jul 2017 10:53:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daNga-0001sV-1A for bug-coreutils@gnu.org; Wed, 26 Jul 2017 10:53:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daNgW-0004gl-Q4 for bug-coreutils@gnu.org; Wed, 26 Jul 2017 10:53:16 -0400 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:36573) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1daNgW-0004fh-J8 for bug-coreutils@gnu.org; Wed, 26 Jul 2017 10:53:12 -0400 Received: by mail-lf0-x22c.google.com with SMTP id o85so9928240lff.3 for ; Wed, 26 Jul 2017 07:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=3VYwVQNzbu0Y11rilS0CMypOz9Z7vd6YnXRXK1aUG2c=; b=sYeD9Ijen+/0DBJU/3mbGopttxisKOd1b3urM7YgzZqsval9GEniwkxW8XsC2yWr7y l6oM/L4eQo+N8j1e5VlNMCSA/M4E01ONRWffvkx7N4fG/vX+5l9zdYjW742o89YxXrmH iHEp5Rwnfqsp7Dd4lWsPodWhKrbZeKXO/63JKEOiielgZLVYhVIZh4dlYCBQCCRgtyUH f62YovrWnfwkC9puKE5UjHWF3FZw12mayrOShXx7QMfdK+e0u137QyJ6hucm9YVdlvoV 3iQp9BJlCShnQ0RUAVNt0o7KZB1kKrQmlXoxa0i6U7sP0ue+DnpoyHg+l8DlIvLmzf2j HIpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=3VYwVQNzbu0Y11rilS0CMypOz9Z7vd6YnXRXK1aUG2c=; b=b5IUCk9LoVnkWubLleVFYTB+Rs8Z8u+GAnf241BkphsxbKkrZGZ4gGpOk8XIszH8kh Itb7P4CD290EBfy0sdvszPXb0Q7UqcteSaB/hbCNW6ZthsfG1fQXXapR5PWyLTOPeM9I +NDXImCcs6rnbfHKOTu9IUM1jVAid1FN8FCBO3piZ/Ge9W+YwtqJVW3dqQC8h0fInJR3 4gE6BVIlpxamA1UFp2qXPLp9288y5n5fF0AFfPcqe8f1MUelSzP06auXtGlRZqk23UQD vDBPD1Xjc080nXFxoNZffUMac3Jvz71jHVQ2u6Z7fVg+b6seH70Csl4XZkzkoKQZiZ7B Wibw== X-Gm-Message-State: AIVw111YHi3AcrlWsf+gaj7DLK4XLDMT9TBS94CAZK5RDp2ipRecDmrc Qn0egTW82N85hJfpyRA= X-Received: by 10.46.1.81 with SMTP id 78mr636281ljb.67.1501080789441; Wed, 26 Jul 2017 07:53:09 -0700 (PDT) Received: from [192.168.0.117] (staticline17260.toya.net.pl. [85.89.184.221]) by smtp.googlemail.com with ESMTPSA id f25sm1051917ljb.13.2017.07.26.07.53.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 07:53:08 -0700 (PDT) To: bug-coreutils@gnu.org From: Jacek Wielemborek Subject: grep error: "regexec.c:1375: pop_fail_stack: Assertion `num >= 0' failed." Message-ID: Date: Wed, 26 Jul 2017 16:53:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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-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: -4.0 (----) Hi, Try out the following test case, IIRC found with the aid of afl-fuzz: grep -E -f <( echo 'fzJ7fymOjgqOjgkfMnt/KSgfVzN8pFyQKR8zfGR7pGuQKR8zfCh8Mnt/KSgfVzN8pFyQKR8zfGR7pGuQKR8zfGR7kCkoCx8zfDJ7fymOrQmOjgkfM3wkXDI=' | base64 -d ) /dev/null grep: regexec.c:1375: pop_fail_stack: Assertion `num >= 0' failed. I reported it once as on Fedora's Bugzilla, but got no reaction - in that case it even triggered a segmentation fault. Cheers, d33tah From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 12:25:09 2017 Received: (at 27838-done) by debbugs.gnu.org; 26 Jul 2017 16:25:09 +0000 Received: from localhost ([127.0.0.1]:57594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daP7V-0002nO-0s for submit@debbugs.gnu.org; Wed, 26 Jul 2017 12:25:09 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daP7S-0002mq-Iq for 27838-done@debbugs.gnu.org; Wed, 26 Jul 2017 12:25:07 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AB7D416017B; Wed, 26 Jul 2017 09:25:00 -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 tDnHBPZo7J8z; Wed, 26 Jul 2017 09:24:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9F9D516065A; Wed, 26 Jul 2017 09:24:59 -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 TTRDst6PwwT8; Wed, 26 Jul 2017 09:24:59 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7FC5C16017B; Wed, 26 Jul 2017 09:24:59 -0700 (PDT) Subject: Re: bug#27838: grep error: "regexec.c:1375: pop_fail_stack: Assertion `num >= 0' failed." To: Jacek Wielemborek , 27838-done@debbugs.gnu.org References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Wed, 26 Jul 2017 09:24:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------744C6A4E4AE637E9C78F54CF" Content-Language: en-US X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27838-done 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: -0.0 (/) This is a multi-part message in MIME format. --------------744C6A4E4AE637E9C78F54CF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Thanks, that is due to an already known bug in glibc; see: https://sourceware.org/bugzilla/show_bug.cgi?id=3D18986 https://debbugs.gnu.org/21513 To work around the problem with grep, use './configure --with-included-re= gex'=20 when building grep, or encourage your upstream distributor to do so (or b= etter=20 yet, to fix glibc). You might also follow up on the glibc bug report to m= ention=20 that the problem affects you too. In the meantime I installed the attached patch, to add your test case to = grep's=20 test suite. The test is expected to fail if glibc regex is used. --------------744C6A4E4AE637E9C78F54CF Content-Type: text/x-patch; name="0001-tests-add-Bug-27838-test-case.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-tests-add-Bug-27838-test-case.patch" =46rom 3fb90a86a9aebe164bb4bb0e03f779ef8004d4d5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 26 Jul 2017 09:22:57 -0700 Subject: [PATCH] tests: add Bug#27838 test case * tests/backref-alt: New test case from a fuzzer. --- tests/backref-alt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/backref-alt b/tests/backref-alt index d5bae5c..7bfaf18 100755 --- a/tests/backref-alt +++ b/tests/backref-alt @@ -24,4 +24,10 @@ grep -E '0|()0|\1|0' in >out status=3D$? test $status -eq 2 || test $status -eq 1 || fail=3D1 =20 +# This fuzz test comes from Bug#27838. +printf '\1772{\177)\216\216\n\216\216\t\0372{\177)(\037W3|\244\\\220)\03= 73|d{\244k\220)\0373|(|2{\177)(\037W3|\244\\\220)\0373|d{\244k\220)\0373|= d{\220)(\013\0373|2{\177)\216\255\t\216\216\t\0373|$\\2\n' >pat +LC_ALL=3DC grep -E -f pat in >out +status=3D$? +test $status -eq 2 || test $status -eq 1 || fail=3D1 + Exit $fail --=20 2.7.4 --------------744C6A4E4AE637E9C78F54CF-- From unknown Mon Jun 23 18:31:37 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, 24 Aug 2017 11: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