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".
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.
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.
My locale is set to en_GB.UTF-8 and I'm not seeing this crash
(In reply to comment #3) > My locale is set to en_GB.UTF-8 and I'm not seeing this crash > worksforme too