Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 52182 - grep-2.5e-4 segfaults with argument of
grep-2.5e-4 segfaults with argument of
Product: Red Hat Raw Hide
Classification: Retired
Component: grep (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-08-21 10:16 EDT by Ed Marshall
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-21 10:16:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ed Marshall 2001-08-21 10:16:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010803

Description of problem:
When you run grep with the option '-C', with an invalid modifier (ie. some
non-numeric value), it segfaults.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Run "grep -C 'foo' /etc/passwd".

Actual Results:  Segmentation fault:

Starting program: /bin/grep -riC 'f[t-v]ck' /usr/src/linux/.
Program received signal SIGSEGV, Segmentation fault.
0x40081c3c in _IO_vfprintf (s=0xbfffcd20, format=0x805ce40 "%s: %s: %s\n", 
    ap=0xbffff8d8) at ../sysdeps/i386/i486/bits/string.h:530
../sysdeps/i386/i486/bits/string.h: No such file or directory.
	in ../sysdeps/i386/i486/bits/string.h
(gdb) where
#0  0x40081c3c in _IO_vfprintf (s=0xbfffcd20, format=0x805ce40 "%s: %s: %s\n", 
    ap=0xbffff8d8) at ../sysdeps/i386/i486/bits/string.h:530
#1  0x40084ff4 in buffered_vfprintf (s=0x4015d180, 
    format=0x805ce40 "%s: %s: %s\n", args=0x0) at vfprintf.c:2087
#2  0x4008001b in _IO_vfprintf (s=0x4015d180, format=0x805ce40 "%s: %s: %s\n", 
    ap=0xbffff8cc) at vfprintf.c:1272
#3  0x08054942 in error ()
#4  0x0804991d in strcpy ()
#5  0x0804b2e3 in strcpy ()
#6  0x400467c7 in __libc_start_main (main=0x804b180 <strcpy+6696>, argc=4, 
    ubp_av=0xbffff9b4, init=0x8049260, fini=0x805c8d0 <__umoddi3+560>, 
    rtld_fini=0x4000db74 <_dl_fini>, stack_end=0xbffff9ac)
    at ../sysdeps/generic/libc-start.c:129

Expected Results:  There should have been an error message indicating
invalid usage of the -C option.

Additional info:
Comment 1 Bernhard Rosenkraenzer 2001-08-22 06:39:37 EDT
That's one of the reason why we've gone back to 2.4. (along with the fact that 
we thought 2.5-final would be released earlier when we put the beta in the 

Note You need to log in before you can comment on or make changes to this bug.