Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 187385

Summary: sys-apps/grep-2.5.1a-r1 crashes (core dump) with attached test case
Product: Gentoo/Alt Reporter: Joe Peterson (RETIRED) <lavajoe>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: test case (bash script)

Description Joe Peterson (RETIRED) gentoo-dev 2007-08-01 14:47:31 UTC
The grep utility dumps core when run with the attached script.  The crash (with this test case) happens on Gentoo/FreeBSD but not Gentoo/Linux.  Note that a long list of text lines are fed to "grep -F".
Comment 1 Joe Peterson (RETIRED) gentoo-dev 2007-08-01 14:49:15 UTC
Created attachment 126612 [details]
test case (bash script)

This bash script invokes the crash on Gentoo/FreeBSD.  I have not tried other versions of grep, so I do not know if this is specific to the stated version or not.
Comment 2 Joe Peterson (RETIRED) gentoo-dev 2007-08-01 17:48:36 UTC
Note that the UTF-8 locale seems to be required to make grep crash in this way, so set LANG to en_US.UTF-8 (or en_GB.UTF-8, if you prefer) before running the test script.  The code around the crash site deals with multibyte chars, which clued me in to this.

There is also a bash bug that only occurs on FreeBSD (both Gentoo and vanilla) that is related to UTF-8 - not sure if this is related.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-08-02 10:05:20 UTC
My locale is set to en_GB.UTF-8 and I'm not seeing this crash
Comment 4 Alexis Ballier gentoo-dev 2009-07-05 19:40:06 UTC
(In reply to comment #3)
> My locale is set to en_GB.UTF-8 and I'm not seeing this crash
> 

worksforme too