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

Re: [PATCH v2] grep: skip UTF8 checks explicitly

From
Carlo Arenas <carenas@gmail.com>
Date
Aug 28, 2019, 16:57 UTC
Message-ID
<CAPUEsphatmoBg3jV9p_xLF_zYe0qn=S=5UTYBCHKjnuNZm4_VA@mail.gmail.com>
In-Reply-To
<20190828145444.31588-1-carenas@gmail.com>

FWIW, the changes in grep.h are IMHO optional and hadn't been really tested as I couldn't find a version of PCRE1 old enough to trigger it but I am hoping are simple enough to work.

As in my original proposal, there is no test because this is going to (as documented) trigger undefined behaviour and so I don't see how we can reliably test that. Goes without saying tthough, that the same is triggered when JIT is enabled and the JIT fast path is being used, so this is not a regression and will be more visible once ab/pcre-jit-fixes gets merged because we are moving out of the JIT fast path with a patch[0] in that series

While Ævar made a point[1] that this wasn't a solution to the problem, it was because PCRE2 could have a better one (still missing but based on ab/pcre-jit-fixes), and it was expected that PCRE2 will be used a lot more and so it wasn't a good idea for it (something that doesn't apply to PCRE1)

the patch was based on maint (like all bugfixes) but applies cleanly to master and next, it will conflict with pu but for easy of merge I'd applied it on top of cb/pcre1-cleanup and make it available in GitHub[2]; that branch could be used as well as a reroll for that topic (if that is preferred)

the error message hasn't been changed on this patch, as it might make sense to improve it as well for PCRE2, but at least shouldn't be triggered anymore (ex, from running a freshly built git without the patch and linked against a non JIT enabled PCRE1):

$ ./git-grep -P 'Nguyễn Thái.Ngọc' .mailmap:Nguyễn Thái Ngọc Duy <pclouds@gmail.com> fatal: pcre_exec failed with error code -10

Carlo

[0] 685668faaa (grep: stop using a custom JIT stack with PCRE v1, 2019-07-26) [1] https://public-inbox.org/git/87lfwn70nb.fsf@evledraar.gmail.com/ [2] https://github.com/carenas/git/tree/pcre1-cleanup

Previous: Carlo Marcelo Arenas BelónNext: Carlo Arenas
Message 9 of 26 in “grep: skip UTF8 checks explicitally”
  1. grep: skip UTF8 checks explicitallyCarlo Marcelo Arenas Belón, Jul 21, 2019
  2. Eric SunshineJul 21, 2019
  3. Johannes SchindelinJul 22, 2019
  4. grep: skip UTF8 checks explicitlyCarlo Marcelo Arenas Belón, Jul 22, 2019
  5. Junio C HamanoJul 24, 2019
  6. Johannes SchindelinJul 24, 2019
  7. Junio C HamanoJul 24, 2019
  8. grep: skip UTF8 checks explicitlyCarlo Marcelo Arenas Belón, Aug 28, 2019
  9. Carlo ArenasAug 28, 2019
  10. Carlo ArenasSep 9, 2019
  11. Junio C HamanoSep 9, 2019
  12. Ævar Arnfjörð BjarmasonJul 22, 2019
  13. Carlo ArenasJul 23, 2019
  14. Johannes SchindelinJul 23, 2019
  15. Carlo ArenasJul 24, 2019
  16. Johannes SchindelinJul 24, 2019
  17. Ævar Arnfjörð BjarmasonJul 24, 2019
  18. Junio C HamanoJul 24, 2019
  19. Johannes SchindelinJul 25, 2019
  20. Junio C HamanoJul 25, 2019
  21. Johannes SchindelinJul 25, 2019
  22. Ævar Arnfjörð BjarmasonJul 26, 2019
  23. Carlo ArenasJul 26, 2019
  24. Ævar Arnfjörð BjarmasonJul 26, 2019
  25. Junio C HamanoJul 26, 2019
  26. Ævar Arnfjörð BjarmasonJul 26, 2019

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.