[Privoxy-devel] PATCH for pcre2 support

Gagan Sidhu broly at mac.com
Thu Mar 9 16:49:52 CET 2023


sorry about this (lol), but upon further analysis i totally didn’t need the pcre2_matches_dummy variable.

i didn’t pay enough attention to the fact that outputs was originally declared with size PCRS_MAX_SUBMATCHES.

so if i declare pcre2_matches to this size, then no reallocation is necessary at all because these are the *submatches*.
	-and only the *matches* structure should grow. 

in any case, since PCRS_MAX_MATCH_INIT >PCRS_MAX_SUBMATCHES, this may have not caused any problems at all (40 > 33).

i also added a pcre2_jit_compile call that some say is equivalent to pcre2_study.

by calling pcre2_match on the pcre2_code variable that has been compiled with pcre2_jit, we should get jit capability (if available).

new sha256 is : 

3986178a0dd241c18ef61297c4a1f48252033610921bc80dfa4d8f5bb0035117


hopefully this will yield more positive results.
Thanks,
Gagan

> On Mar 9, 2023, at 6:09 AM, Gagan Sidhu <broly at mac.com> wrote:
> 
> hi fabian,
> 
> yes i just updated that exact patch (deleted, reuploaded) and it should now be:
> 
> 106592f5e18ded8f6516d98522b9bbfd10185e40  shitty_pcre2.patch
> 
> 
> i suspect, or hope, this will fix the cgi issue, just because of how i ignored the usage of the dummy variable in the first patch.
> 
> if it works, the other two warnings need to be fixed by changing the declarations of the variables passed to the function itself.
> 
> Thanks,
> Gagan
> 
>> On Mar 9, 2023, at 5:59 AM, Fabian Keil <fk at fabiankeil.de> wrote:
>> 
>> Gagan Sidhu <broly at mac.com> wrote on 2023-03-09 at 05:22:40:
>> 
>>> yes there were, but that’s the old patch and i suspect it wouldn’t work because i screwed up the assignment of the dummy variable.
>>> 
>>> i believe i uploaded a newer patch to the sourceforge that fixes that problem.
>>> 
>>> i checked the uploaded patch and saw it was unchanged, because i forgot to add the ‘>’ when doing a “git diff <patchname>”
>>> 
>>> can you try the newer patch and report back?
>> 
>> I used:
>> 
>> fk at t520 ~/git/privoxy $sha256 shitty_pcre2.patch 
>> SHA256 (shitty_pcre2.patch) = 5b566f815b69ee4e6331895c6425ec542f45492059c2eded396ac7678ef631c8
>> 
>> It's the only patch I see on <https://sourceforge.net/p/ijbswa/bugs/935/>.
>> 
>> 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