https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193835

            Bug ID: 193835
           Summary: bug in grep with -m and -A
           Product: Base System
           Version: 10.0-STABLE
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: ---
         Component: gnu
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: zhe...@gmail.com

grep segfault

create a file test.txt
-------------
text
text
<blank line>
text
text
-------------

run command: grep -m 1 -A 2 -e '^$' test.txt
> Segmentation Fault (core dumped)

in file test.txt add to end blank line

run grep again.
Result: none

Change -m1 to -m2
Result: all is ok

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to