On Tue, Dec 30, 2008 at 03:21:18PM +0000, Kyrian wrote:
>I ran a test on some plain text files to try and diagnose this further,
>although on a different Debian Etch machine.
>
>Firstly, one line files:
>
>a.txt:word 1
>b.txt:word 2
>c.txt:word 3
>
>WORKS:
>
>kyr...@blackwidow:/tmp$ grep -i -A1 -m1 ^word *.txt
>a.txt:word 1
>--
>b.txt:word 2
>--
>c.txt:word 3
>kyr...@blackwidow:/tmp$
>
>Then when I add some extra lines to all of the files at the same time
>and try the same it segfaults.
>
>Removing the extra lines from the c.txt file still results in a crash.
>
>Removing the extra lines from the c.txt and b.txt files still results
>in a crash.
>
>Removing the extra lines from the a.txt, b.txt and c.txt files still
>results in normal behaviour once more.
>
>If I add a second line to any one of files on its own, I get the crash
>back.
>
>The crash also occurs if you use "grep -r" on a directory containing
>those files, instead of "*.txt".
>
>Hope that helps.
>
>K.
>
>-- 
>Kev Green, aka Kyrian. E: kyrian@ore.org WWW: http://kyrian.ore.org/
>  ISP/Perl/PHP/Linux/Security Contractor, via http://www.orenet.co.uk/

I tried grep_2.5.4-3 and couldn't reproduce the bug.

grep -V
GNU grep 2.5.4

I created 6 files and run grep as follows.

for i in {a..f}; do echo word $i > $i; done; grep -i -A1 -m1 ^word {a..f}; echo 
$?
a:word a
--
b:word b
--
c:word c
--
d:word d
--
e:word e
--
f:word f
0

I added an extra line to the files and run grep again without any
problem.

for i in {a..f}; do echo word $i >> $i; done; grep -i -A1 -m1 ^word {a..f}; 
echo $?
a:word a
--
b:word b
--
c:word c
--
d:word d
--
e:word e
--
f:word f
0



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to