git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] userdiff.c: Avoid old glibc regex bug causing t4034-*.sh test failures

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 3, 2011, 21:07 UTC
Message-ID
<20110503210716.GL1019@elie>
In-Reply-To
<4DC04021.1040606@ramsay1.demon.co.uk>
Hi,
Ramsay Jones wrote:
Show 8 quoted lines
> This is an RFC because:
>     - A simple fix would be for me to put NO_REGEX=1 in my config.mak,
>       since the compat/regex routines don't suffer this problem.
>     - I suspect this bug is old enough that it will not affect many users.
>     - I have not audited the other non-matching list expressions in
>       userdiff.c
>     - blame, grep and pickaxe all call regcomp() with the REG_NEWLINE
>       flag, but get the regex from the user (eg from command line).

I think excluding \n along with ' ' and \t in similar places makes sense, but that meanwhile we should add tests to the testsuite for blame/grep/pickaxe to catch such implementations failing when NO_REGEX=1 is not set.

Does that make sense?  Thanks for tracking this down.
Jonathan
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 3 in “userdiff.c: Avoid old glibc regex bug causing t4034-*.sh test failures”
  1. userdiff.c: Avoid old glibc regex bug causing t4034-*.sh test failuresRamsay Jones, May 3, 2011
  2. Jonathan NiederMay 3, 2011
  3. Ramsay JonesMay 7, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.