grep-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new snapshot available: grep-3.4-almost.26-5419


From: Paul Eggert
Subject: Re: new snapshot available: grep-3.4-almost.26-5419
Date: Fri, 18 Sep 2020 11:12:41 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 9/17/20 10:22 PM, Bruce Dubbs wrote:
invalid-re...
sh: line 1: 15041 Segmentation fault      grep -f g > invalid-re.O 2> 
invalid-re.E
filename-lineno.pl: test invalid-re failed: exit status mismatch: expected 2, got 139

This says grep has a segmentation violation when given an invalid regular expression. Please give us a GDB backtrace for that. Make sure you're using -g3 (or at least -g) when compiling grep. Then run it this way:

$ cd src
$ printf '1\n2\n3\n4[[\n' >g
$ gdb grep
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from grep...done.
(gdb) r -f g
Starting program: /home/eggert/src/gnu/grep/src/grep -f g
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/home/eggert/src/gnu/grep/src/grep: g:4: Unmatched [, [^, [:, [., or [=
[Inferior 1 (process 22749) exited with code 02]


My grep did the right thing but yours should crash, and at that point you can give GDB the 'bt' command and see what GDB outputs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]