Navigation Menu

Skip to content

pr-306/dscho/fix-for-pcre-chartables-leakfix-v1

For a couple of days, maybe even a week, pu fails consistently, in the
Windows job where it tests t7816. The symptom is a segmentation fault.

I finally got to diagnose this, and it looked at first as if there was yet
another buffer overrun that was so small that valgrind failed to detect it
(see https://github.com/gitgitgadget/git/pull/178). The problem is another
one, though: we ask PCRE2 to allocate a table (and it uses the system
allocator for that), and then try to release it using nedmalloc's free()
replacement.

This is squarely a problem with cb/pcre2-chartables-leakfix in conjunction
with an overridden allocator.

Junio, for your convenience, I rebased this patch directly on top of
ab/pcre-v2 and pushed out the let-pcre2-respect-nedmalloc branch at
https://github.com/dscho/git ready to be pulled. The rebased version is not
technically a bug fix, as I do not see any way that ab/pcre-v2 uses
mismatched allocators for malloc()/free(), but just in case that you wanted
to have it in v2.23.0 and not on top cb/pcre2-chartables-leakfix...

Johannes Schindelin (1):
  pcre2: allow overriding the system allocator

 grep.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

base-commit: 7d3bf76999452ff64c84cec25fd95a7a95744b78

Submitted-As: https://public-inbox.org/git/pull.306.git.gitgitgadget@gmail.com
Assets 2