[Privoxy-devel] PATCH for pcre2 support
Fabian Keil
fk at fabiankeil.de
Mon Jun 19 15:05:06 CEST 2023
Gagan Sidhu <broly at mac.com> wrote on 2023-06-19 at 06:40:17:
> > On Jun 19, 2023, at 4:00 AM, Fabian Keil <fk at fabiankeil.de> wrote:
> > I'm not seeing different crashes like this one, though:
I meant to write "I'm now seeing ...".
> > #0 0x0000000823c95acd in ?? () from /usr/local/lib/libpcre2-8.so.0
> > [Current thread is 1 (LWP 108957)]
> > (gdb) where
> > #0 0x0000000823c95acd in ?? () from /usr/local/lib/libpcre2-8.so.0
> > #1 0x0000000823c9002a in pcre2_match_8 () from /usr/local/lib/libpcre2-8.so.0
> > #2 0x00000008255e60fe in pcre2_regexec () from /usr/local/lib/libpcre2-posix.so.3
> > #3 0x000000000027309b in path_matches (path=0x856e3c040 "/iomm/latest/bootstrap/stub.js", pattern=0x82a2c5f20) at urlmatch.c:1360
> > #4 0x0000000000272e7e in url_match (pattern=0x82a2c5f20, http=0x835520a58) at urlmatch.c:1387
> > #5 0x000000000024cfa8 in apply_url_actions (action=0x835520810, http=0x835520a58, client_tags=0x835520ba0, b=0x82a2c5f20) at filters.c:2884
> > #6 0x000000000024cf11 in get_url_actions (csp=0x835520808, http=0x835520a58) at filters.c:2845
> > #7 0x00000000002580ac in process_encrypted_request_headers (csp=0x835520808) at jcc.c:2799
> > #8 0x0000000000256a03 in chat (csp=0x835520808) at jcc.c:4472
> > #9 0x0000000000255796 in serve (csp=0x835520808) at jcc.c:5056
> > #10 0x0000000825a07a7a in thread_start (curthread=0x8355a6000) at /usr/src/lib/libthr/thread/thr_create.c:292
> > #11 0x0000000000000000 in ?? ()
> > Backtrace stopped: Cannot access memory at address 0x843d01000
> >
> > I haven't been able to reproduce this yet.
>
> i didn’t report that one, haha. who did?
>
> it seems these are “teething problems” when moving from pcre1 to pcre2?
>
> it’s possible that the new data structure we must use,
> pcre2_matches, needs to be “bigger” than PCRS_MAX_SUBMATCHES.
>
> the cleanest way i can think of, would be to change from
>
> > pcre2_match_data_create(PCRS_MAX_SUBMATCHES, NULL)
>
>
> to
>
> > pcre2_match_data_create_from_pattern(job->pattern, NULL)
I'm not sure about this but I guess it doesn't hurt.
> that way, it’s allocated according to the pattern.
>
> sha256sum is
>
> c1d2ac55d13e583a2276ab31240cde0ab779653abfdb4db1315001fbc95430af
>
> i’ve updated my patch on sourceforge with this change, i ran the
> regression tests and nothing changes for me (just the elsainsights
> fails. i have no diea why. probably because i’m on a mac)
Thanks for the update.
> p.s. how come you can send patches via the list, but i can’t?
> perks of being ’the boss’, i assume? ;)
I have no special privileges as far as attachments are concerned
but attachments with the "wrong" content type are silently dropped.
The allowed content types are:
multipart
message/rfc822
application/pgp-signature
text/plain
text/x-patch
image/png
image/jpeg
There's also a 40 KB limit for the message body but mails
that are "too large" only require moderator approval and
aren't automatically deleted.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-devel/attachments/20230619/86b89bb2/attachment.bin>
More information about the Privoxy-devel
mailing list