[Privoxy-devel] PATCH for pcre2 support

Gagan Sidhu broly at mac.com
Mon Jun 26 15:41:52 CEST 2023


> On Jun 26, 2023, at 6:33 AM, Fabian Keil <fk at fabiankeil.de> wrote:
> 
> Gagan Sidhu <broly at mac.com> wrote on 2023-06-25 at 15:14:51:
> 
>> fabes i did more digging and it seems to be one of the flags
>> being passed to the regcomp function in the compile_pattern function of urlmatch.c
>> 
>> 
>> by adding “REG_UNGREEDY” to the regcomp flags, the tests complete with 5 forks (see below).
> 
> I can't reproduce this, I still get the crashes with REG_UNGREEDY.
> 
weird, but to be honest after i learned of the differences between {UN}GREEDY, it doesn’t seem to be the solution anyways.

> I tried to workaround the crashes by adding a mutex to
> get_url_actions() but that didn't help either.
> 
> I'm now thinking we may have to use the pcre2_match() API
> everywhere instead of using the POSIX interface (regexec() etc.).
> 
this does seem to be the only solution, and i think i’ll be busy this week but if i find the time, i will try that.

it just sucks having to do that *everywhere* and only for PCRE2, but i guess there’s not much else we can do.

if that does work, it makes you wonder what exactly the compatibility wrapper is doing such that the direct calls to pcre2_compile/pcre2_match succeed.

i’ll throw some jit in there too. busy this week, but it’s possible i could find time in the evenings, we’ll see.

> Fabian
> _______________________________________________
> Privoxy-devel mailing list
> Privoxy-devel at lists.privoxy.org
> https://lists.privoxy.org/mailman/listinfo/privoxy-devel



More information about the Privoxy-devel mailing list