bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #13847] memchr() not checked on Pexecute() - leads to segfault


From: Charles Levert
Subject: [bug #13847] memchr() not checked on Pexecute() - leads to segfault
Date: Sat, 23 Jul 2005 02:07:49 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Update of bug #13847 (project grep):

                  Status:                    None => Works For Me           

    _______________________________________________________

Follow-up Comment #1:

Although this bug is already fixed in CVS, the attached patch suggests the
idea of adding a test for it.

The test itself can probably be shortened to just

echo | ${GREP} -P '\s*$' > /dev/null 2>&1

and a check of the return value in $? (it segfaults when the bug is there).  I
leave the * in the pattern since we may eventually want to alter the -P
behavior to perform the equivalent of a Perl chomp on each input line before
attempting the match (and of a Perl print "$_\n" when the line matches).

Should we add a tests/pcre.sh file with a guard at the beginning to detect if
grep was even compiled with HAVE_LIBPCRE and silently skip the whole test file
if it wasn't?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13847>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]