[Privoxy-devel] PATCH for pcre2 support
    Gagan Sidhu 
    broly at mac.com
       
    Sat Mar 11 19:47:17 CET 2023
    
    
  
hi fabian,
can i get a little more clarification? i ran the test and on both a pcre2 and pcre-compiled version, and the result is the same:
pcre:
> gcc -L/opt/local/lib  -Dunix -o privoxy actions.o cgi.o cgiedit.o cgisimple.o deanimate.o encode.o errlog.o filters.o gateway.o jbsockets.o jcc.o list.o loadcfg.o loaders.o miscutil.o parsers.o ssplit.o urlmatch.o client-tags.o   pcrs.o     -lpcre -lz -lpcre -lpcreposix   
> grep -v '^#MASTER#' default.action.master > default.action
> GagansMacPro:privoxy Gagan$ ./privoxy
> GagansMacPro:privoxy Gagan$ ps -A | grep privoxy
> 14540 ??         0:00.04 ./privoxy
> 57690 ttys001    0:01.42 vim privoxy/pcrs.c
> 14534 ttys002    0:00.91 vim tools/privoxy-regression-test.pl
> 14542 ttys002    0:00.00 grep privoxy
> 90105 ttys004    0:00.15 vim rules/privoxy.mk
> GagansMacPro:privoxy Gagan$ tools/privoxy-regression-test.pl 
> 2023-03-11 11:03:02: Asking Privoxy for the number of action files available ...
> 2023-03-11 11:03:02: Gathering regression tests from 3 action file(s) delivered by Privoxy 3.0.33.
> 2023-03-11 11:03:02: Executing regression tests ...
> 2023-03-11 11:03:06: Failure for test 70. Supposedly-blocked URL: 'https://elsa.memoinsights.com/t?pid=62012a7a19351c07620394e0&url=https%3A%2F%2Farstechnica.com%2Ftech-policy%2F2022%2F08%2Fthe-women-calling-out-apples-handling-of-misconduct-claims%2F&author%5B%5D=Financial%20Times&title=The%20women%20calling%20out%20Apple%E2%80%99s%20handling%20of%20misconduct%20claims&date=2022-08-04T13%3A39%3A42Z&referrer=&ref_url=&page_url=https%3A%2F%2Farstechnica.com%2Ftech-policy%2F2022%2F08%2Fthe-women-calling-out-apples-handling-of-misconduct-claims%2F%3Fcomments%3D1&cb=MEMO.API.callbacks.cbakynzcplf&v=v3.0.6&t=5000&e=5000&s=7362'
> 2023-03-11 11:03:25: Executed 452 regression tests. Skipped 17. 451 successes, 1 failures.
pcre2:
> gcc -L/opt/local/lib  -Dunix -o privoxy actions.o cgi.o cgiedit.o cgisimple.o deanimate.o encode.o errlog.o filters.o gateway.o jbsockets.o jcc.o list.o loadcfg.o loaders.o miscutil.o parsers.o ssplit.o urlmatch.o client-tags.o   pcrs.o     -lz -lpcre2-8 -lpcre2-posix   
> grep -v '^#MASTER#' default.action.master > default.action
> GagansMacPro:privoxy Gagan$ ./privoxy
> ps -GagansMacPro:privoxy Gagan$ ps -A | grep privoxy
> 17837 ??         0:00.21 ./privoxy
> 17256 ttys001    0:00.26 vim privoxy/pcrs.c
> 21572 ttys002    0:00.00 grep privoxy
> 90105 ttys004    0:00.15 vim rules/privoxy.mk
> GagansMacPro:privoxy Gagan$ tools/privoxy-regression-test.pl 
> 2023-03-11 11:37:31: Asking Privoxy for the number of action files available ...
> 2023-03-11 11:37:31: Gathering regression tests from 3 action file(s) delivered by Privoxy 3.0.33.
> 2023-03-11 11:37:31: Executing regression tests ...
> 2023-03-11 11:37:35: Failure for test 70. Supposedly-blocked URL: 'https://elsa.memoinsights.com/t?pid=62012a7a19351c07620394e0&url=https%3A%2F%2Farstechnica.com%2Ftech-policy%2F2022%2F08%2Fthe-women-calling-out-apples-handling-of-misconduct-claims%2F&author%5B%5D=Financial%20Times&title=The%20women%20calling%20out%20Apple%E2%80%99s%20handling%20of%20misconduct%20claims&date=2022-08-04T13%3A39%3A42Z&referrer=&ref_url=&page_url=https%3A%2F%2Farstechnica.com%2Ftech-policy%2F2022%2F08%2Fthe-women-calling-out-apples-handling-of-misconduct-claims%2F%3Fcomments%3D1&cb=MEMO.API.callbacks.cbakynzcplf&v=v3.0.6&t=5000&e=5000&s=7362'
> 2023-03-11 11:37:55: Executed 452 regression tests. Skipped 17. 451 successes, 1 failures.
i will note that when i tried to run the git version on my mac, it does not manage to even to successfully run in daemon mode. it quietly terminates.
i applied the patch against 3.0.33 and it runs in the background and outputs the same result for the regression tests for pcre1 or pcre2.
Thanks,
Gagan
> 
>> On Mar 11, 2023, at 5:45 AM, Gagan Sidhu <beatlesnut at mac.com> wrote:
>> 
>> Hi fabian
>> 
>> Thanks for the information. May I ask how you're testing so I can it on my own before presenting any further changes?
>> 
>> Thank you!
>> 
>>  Original Message  
>> From: Fabian Keil
>> Sent: Saturday, 11 March 2023 2:56 AM
>> To: Gagan Sidhu
>> Reply To: privoxy-devel at lists.privoxy.org
>> Cc: privoxy-devel at lists.privoxy.org
>> Subject: Re: [Privoxy-devel] PATCH for pcre2 support
>> 
>> Gagan Sidhu <broly at mac.com> wrote on 2023-03-09 at 08:49:52:
>> 
>>> 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
>> 
>> I tried the latest version:
>> 
>> fk at t520 ~/git/privoxy $sha256 substandard_pcre2.patch 
>> SHA256 (substandard_pcre2.patch) = 142f99e4b685fee8c6592ea47a89cc4ea29622744458e70d3ae1f370abd9df27
>> 
>> and the CGI pages are still empty.
>> 
>> Fabian
>> 
> 
    
    
More information about the Privoxy-devel
mailing list