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

Re: [musl] Re: Regression: git no longer works with musl libc's regex impl

From
SNSzabolcs Nagy <nsz@port70.net>
Date
Oct 5, 2016, 13:01 UTC
Message-ID
<20161005130130.GM1280@port70.net>
In-Reply-To
<alpine.DEB.2.20.1610051250080.35196@virtualbox>
* Johannes Schindelin <Johannes.Schindelin@gmx.de> [2016-10-05 13:17:49 +0200]:
> I had a brief look at the source code (you use backtracking... hopefully
> nobody uses musl to parse regular expressions from untrusted, or
> inexperienced, sources [*1*]), and it seems that the regex code might
does git use BRE?

a conforming BRE implementation has to use back tracking if the pattern has back references.

usually ERE implementations may also use back tracking since they support back references as an extension.

musl does not support this extension (and many others) so it never uses back tracking for ERE matches, note however that match complexity and memory usage of a conforming ERE implementation is still exponential in pattern length because of repetition counts.

Previous: Johannes SchindelinNext: Rich Felker
Message 10 of 28 in “Regression: git no longer works with musl libc's regex impl”
  1. Rich FelkerOct 4, 2016
  2. Jeff KingOct 4, 2016
  3. Rich FelkerOct 4, 2016
  4. Johannes SchindelinOct 4, 2016
  5. Rich FelkerOct 4, 2016
  6. Johannes SchindelinOct 4, 2016
  7. Ray DonnellyOct 4, 2016
  8. Rich FelkerOct 4, 2016
  9. Johannes SchindelinOct 5, 2016
  10. Szabolcs NagyOct 5, 2016
  11. Rich FelkerOct 5, 2016
  12. James BOct 4, 2016
  13. Rich FelkerOct 4, 2016
  14. Junio C HamanoOct 4, 2016
  15. Jakub NarębskiOct 5, 2016
  16. Rich FelkerOct 5, 2016
  17. Johannes SchindelinOct 5, 2016
  18. James BOct 5, 2016
  19. Jeff KingOct 5, 2016
  20. Rich FelkerOct 5, 2016
  21. Johannes SchindelinOct 6, 2016
  22. Ævar Arnfjörð BjarmasonOct 6, 2016
  23. Jeff KingOct 6, 2016
  24. Rich FelkerOct 6, 2016
  25. Jeff KingOct 6, 2016
  26. Ramsay JonesOct 6, 2016
  27. Jakub NarębskiOct 7, 2016
  28. Johannes SchindelinOct 4, 2016

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.