Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187385 - sys-apps/grep-2.5.1a-r1 crashes (core dump) with attached test case
Summary: sys-apps/grep-2.5.1a-r1 crashes (core dump) with attached test case
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High major (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-01 14:47 UTC by Joe Peterson (RETIRED)
Modified: 2009-07-05 19:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
test case (bash script) (bar,3.55 KB, text/plain)
2007-08-01 14:49 UTC, Joe Peterson (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
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