[Bug 193835] New: bug in grep with -m and -A

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Sep 22 13:44:52 UTC 2014


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 at FreeBSD.org
          Reporter: zhecka at 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.


More information about the freebsd-bugs mailing list