[Privoxy-devel] PATCH for pcre2 support

Gagan Sidhu broly at mac.com
Sun Mar 19 19:26:19 CET 2023


hello again.

i tried a simple ‘fix’ by introducing an additional size_t variable and the result is much better, but not identical.

13 errors on the regression test.

either way. this is much much much better than before.

i defer to your expertise to produce the final solution, which i think my findings will greatly assist in producing.


> GagansMacPro:privoxy Gagan$ tools/privoxy-regression-test.pl
> 2023-03-19 12:18:14: Asking Privoxy for the number of action files available ...
> 2023-03-19 12:18:14: Gathering regression tests from 3 action file(s) delivered by Privoxy 3.0.33.
> 2023-03-19 12:18:14: Executing regression tests ...
> 2023-03-19 12:18:16: Failure for test 21. Supposedly-blocked URL: 'http://web-t.9gag.com/piwik.php?e_c=PostImpression&e_a=ViewPostForOneSecond&e_n=Hot&e_v=1&idsite=7&rec=1&r=438977&h=14&m=13&s=9&url=https%3A%2F%2F9gag.com%2F&_id=780f7a6cf105beed&_idts=1600003135&_idvc=3&_idn=0&_refts=0&_viewts=1600255370&send_image=0&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=0&java=0&gears=0&ag=0&cookie=1&res=1366x768&e_cvar=%7B%221%22%3A%5B%22PostKey%22%2C%22aR72ZBQ%22%5D%2C%222%22%3A%5B%22TriggeredPage%22%2C%22PostList%22%5D%2C%223%22%3A%5B%22TriggeredPageKey%22%2C%22Hot%22%5D%2C%224%22%3A%5B%22Position%22%2C%22343%22%5D%7D&_cvar=%7B%221%22%3A%5B%22AppVersion%22%2C%2200000%22%5D%7D&gt_ms=222'
> 2023-03-19 12:18:18: Failure for test 69. Supposedly-blocked URL: 'https://odb.outbrain.com/utils/get?url=https%3A%2F%2Fwww.ksta.de%2Fratgeber%2Fgesundheit%2Fhausaerztin-erklaert-milder-verlauf-bei-einer-omikron-infektion---was-heisst-das--39393164&idx=0&rand=18368&key=NANOWDGT01&widgetJSId=AR_2&va=true&et=true&format=html&pdobuid=-1&adblck=false&abwl=false&px=205&py=1389&vpd=0&cw=940&activeTab=true&darkMode=false&settings=true&recs=true&version=2000570&sig=bvSz55IV&apv=false&osLang=en-CA&winW=1350&winH=621&scrW=1366&scrH=768&dpr=1&secured=true&cnsntv2=CPSvfxSPSvfxSAGABCENB9CgAP_AAEAAAAYgIXBVJD7dTWlAMHZ5GNpkCYAU1sAUIOQCCBCAAwAFAEGA8IAC0SACEEQABAACAQAAgRABAAAEEABUAECgQAAEAQEkAAQAhAAIAAJEAAEQAgAQAAoIAAAAAAAIAAABCgSAkBiQQ8LGRGAghIAwQgAQwAABgIACAAMASAAYABAAAAIAAABAAgIEEELoAIELgEQkC0ABAAFQAMgAcgA8AEAAMgAaQBEAEUAJgATwArABvADmAH4AQgAhoBEAESAJYAUoAtwBhwD7AP0AgYBFACNAEpALmAYoA2gBuADiAHoAPkAhsBIgCdgFDgLzAYMAyQBpwDWQHBAPHAhCEACAAkAXQAyECBgaAOAFYALgAhgB-AHyASIAnYMABAOoIgDABWAEMAPwA-QCRAE7CAAIAJBUAUAJgAXAB-AJBAXmMgBgBMgH2AfgC8xgAEAsQ6BsABUADIAHIAPgBAADIAGgAPoAiACKAEwAJ4AVgAuABfADeAHMAPwAhoBEAESAJYATAAowBSgCxAFuAMMAaMA-wD9AIGARQAiwBKQCxAFzAMUAbQA3ABxADqAHoAQ2Ai8BIICRAE7AKHAXmAwYBiQDJAGWANOAcWA8cB-I4AeAAgAC4AJAAyABoAIiAXoAwAB5AD5AIQAXQAyEBpoDbCEBQADIATAAuABfADeALGAfYB-AEUAJSAXMAxQBtADqAHoASCAkQBbQDEgHjgQoIABgAEABoALEAYABdADbCUBYABAAGQAOAAfACIAEwALgAXwBDQCIAIkAUYApQBbgD8AMUAbgA6gB8gEXgJEAXmAywkADAAuAGQBdBSBOABUADIAHIAPgBAADIAGkARABFACYAE8AKQAXwA5gB-AENAIgAiQBRgClAFiALcAaMA-wD9AIsASkAuYBigDaAG4APQAi8BIgCdgFDgLzAZIAywBrIDggHjgQhKACgALgAkACsAGQAsQBgADyALoAaaBAwAAA.YAAAAAAAAAAA&cmpStat=1&ccpaStat=0&ref=https%3A%2F%2Fwww.ksta.de%2Fhtml%2Fdumont-consent%2Findex.html%3Fparam%3DeyJyZWRpcmVjdFVybCI6Ii9yYXRnZWJlci9nZXN1bmRoZWl0L2hhdXNhZXJ6dGluLWVya2xhZXJ0LW1pbGRlci12ZXJsYXVmLWJlaS1laW5lci1vbWlrcm9uLWluZmVrdGlvbi0tLXdhcy1oZWlzc3QtZGFzLS0zOTM5MzE2ND9jYj0xNjQzMDgyNTMxNDU5JmRtY2lkPXNtX3R3X3B1IiwicmVmZXJyZXIiOiIiLCJzdWJkb21haW4iOiJ3d3cifQ%3D%3D'
> 2023-03-19 12:18:18: 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-19 12:18:19: Failure for test 76. Supposedly-blocked URL: 'http://s.analytics.yahoo.com/fpc.pl?a=1000461640983&v=4.43&enc=utf-8&f=http%3A//www.zoover.nl/nederland/limburg/maasbracht/weer%23tabs&b=Het%20Weer%20in%20Maasbracht.%20Bekijk%20Weersverwachting%20van%20Maasbracht%20%7C%20Zoover%23tabs&flv=WIN%2010%2C0%2C45%2C2&d=Mon%2C%2017%20May%202010%2014%3A09%3A26%20UTC&n=-2&g=nl&h=Y&j=1440x900&k=32&l=true&ittidx=0&fpc=uP04C7j4%7ClaDQjglKaa%7Cfses1000461640983%3D%7CkbSSgv6Jaa%7CuP04C7j4%7Cfvis1000461640983%3DZj1odHRwJTNBLy93d3cuem9vdmVyLm5sLyZiPVpvb3ZlciUyMCU3QyUyMFZha2FudGllYmVvb3JkZWxpbmdlbiUyMHZvb3IlMjBlbiUyMGRvb3IlMjByZWl6aWdlcnM%3D%7C8sHTYo10oM%7C8sHTYo10oM%7C8sHTYo10oM%7CT%7C8sHTYo10oM%7C8sHTYo10oM'
> 2023-03-19 12:18:19: Failure for test 79. Supposedly-blocked URL: 'https://collector.githubapp.com/github/page_view?dimensions[page]=https%3A%2F%2Fgithub.com%2Fopenbsd%2Fsrc%2Fblob%2F5ecdd0566b441ae0b99e73f410875e05dc0fa5b7%2Flib%2Flibc%2Finclude%2Fthread_private.h&dimensions[title]=src%2Fthread_private.h%20at%205ecdd0566b441ae0b99e73f410875e05dc0fa5b7%20%C2%B7%20openbsd%2Fsrc%20%C2%B7%20GitHub&dimensions[referrer]=https%3A%2F%2Fgithub.com%2Fopenbsd%2Fsrc%2Fsearch%3Fq%3D_MUTEX_LOCK%26unscoped_q%3D_MUTEX_LOCK&dimensions[user_agent]=Mozilla%2F5.0%20(X11%3B%20ElectroBSD%20amd64%3B%20rv%3A68.0)%20Gecko%2F20100101%20Firefox%2F68.0&dimensions[screen_resolution]=1366x768&dimensions[pixel_ratio]=1&dimensions[browser_resolution]=1362x636&dimensions[tz_seconds]=7200&dimensions[timestamp]=1591515169218&dimensions[referrer]=&dimensions[request_id]=22CA%3AE6F6%3A271ED2A%3A3839C5D%3A5EDB8295&dimensions[visitor_id]=5184934927058829974&dimensions[region_edge]=ams&dimensions[region_render]=ams&dimensions[user_id]=929183&dimensions[user_login]=openbsd&dimensions[repository_id]=66966208&dimensions[repository_nwo]=openbsd%2Fsrc&dimensions[repository_public]=true&dimensions[repository_is_fork]=false&dimensions[repository_network_root_id]=66966208&dimensions[repository_network_root_nwo]=openbsd%2Fsrc&dimensions[repository_explore_github_marketplace_ci_cta_shown]=false&&measures[performance_timing]=1-172-172-13996-12735-12426-12394-3858-172-172-172--13996-0---172-3853-3412-0--&&&dimensions[cid]=268614077.1591515169'
> 2023-03-19 12:18:19: Failure for test 81. Supposedly-blocked URL: 'https://srv-2020-08-22-20.pixel.parsely.com/plogger/?rand=1598128327825&plid=94157330&idsite=theverge.com&url=https%3A%2F%2Fwww.theverge.com%2F2020%2F8%2F21%2F21396316%2Fapple-wordpress-in-app-purchase-tax-update-store&urlref=&screen=1366x768%7C1366x768%7C24&data=%7B%7D&sid=1&surl=https%3A%2F%2Fwww.theverge.com%2F2020%2F8%2F21%2F21396316%2Fapple-wordpress-in-app-purchase-tax-update-store&sref=&sts=1598128167510&slts=0&date=Sat+Aug+22+2020+22%3A32%3A07+GMT%2B0200+(CEST)&action=heartbeat&inc=6&tt=140923&pvid=91707838&u=pid%3D72b66a2ec3c73c8fbf8c925f679fcbd9'
> 2023-03-19 12:18:19: Failure for test 88. Supposedly-blocked URL: 'https://fpa-events.arstechnica.com/plogger/?rand=1617351238373&plid=36453403&idsite=arstechnica.com&url=https%3A%2F%2Farstechnica.com%2Fgadgets%2F2021%2F04%2Fxinuos-finishes-picking-up-scos-mantle-by-suing-red-hat-and-ibm%2F&urlref=&screen=1366x768%7C1366x768%7C24&data=%7B%7D&sid=1&surl=https%3A%2F%2Farstechnica.com%2Fgadgets%2F2021%2F04%2Fxinuos-finishes-picking-up-scos-mantle-by-suing-red-hat-and-ibm%2F&sref=&sts=1617351085989&slts=0&date=Fri+Apr+02+2021+10%3A13%3A58+GMT%2B0200+(CEST)&action=heartbeat&inc=4&tt=4371&pvid=50890683&u=pid%3Df5e180d3fca67aa29521f1510e59850b'
> 2023-03-19 12:18:21: Failure for test 125. Supposedly-blocked URL: 'https://trc.taboola.com/slashdot/trc/3/json?tim=18%3A22%3A49.655&lti=deflated&data=%7B%22id%22%3A608%2C%22ii%22%3A%22_homepage_%22%2C%22it%22%3A%22home%22%2C%22sd%22%3Anull%2C%22ui%22%3Anull%2C%22uifp%22%3Anull%2C%22lbt%22%3A1612905877491%2C%22vi%22%3A1613064169633%2C%22cv%22%3A%2220210209-24-RELEASE%22%2C%22uiv%22%3A%22default%22%2C%22u%22%3A%22https%3A%2F%2Fmobile.slashdot.org%2Fstory%2F21%2F02%2F11%2F0036248%2Fapple-privacy-chief-north-dakota-bill-threatens-to-destroy-the-iphone-as-you-know-it%22%2C%22bv%22%3A%220%22%2C%22ul%22%3A%5B%22en-CA%22%5D%2C%22btv%22%3A%220%22%2C%22bad%22%3A-1%2C%22sw%22%3A1366%2C%22sh%22%3A768%2C%22bw%22%3A1362%2C%22sde%22%3A%221.000%22%2C%22bh%22%3A636%2C%22dw%22%3A1350%2C%22dh%22%3A10270%2C%22r%22%3A%5B%7B%22li%22%3A%22rbox-h2m%22%2C%22s%22%3A4%2C%22uim%22%3A%22thumbnails-rr2%3Aabp%3D0%22%2C%22uip%22%3A%22Below%20Article%20Thumbnails%22%2C%22orig_uip%22%3A%22Below%20Article%20Thumbnails%22%2C%22cd%22%3A255.5%2C%22mw%22%3A300%7D%2C%7B%22li%22%3A%22rbox-h2m%22%2C%22s%22%3A5%2C%22uim%22%3A%22text-links-a%3Aabp%3D0%22%2C%22uip%22%3A%22Below%20Article%20Text%20Links%22%2C%22orig_uip%22%3A%22Below%20Article%20Text%20Links%22%2C%22cd%22%3A9961.4501953125%2C%22mw%22%3A964.5%7D%5D%2C%22cacheKey%22%3A%22home%3D_homepage_%2CBelow%20Article%20Text%20Links%3Dtext-links-a%3Aabp%3D0%2C%2CBelow%20Article%20Thumbnails%3Dthumbnails-rr2%3Aabp%3D0%22%2C%22cb%22%3A%22TRC.callbacks.recommendations_1%22%2C%22lt%22%3A%22deflated%22%7D'
> 2023-03-19 12:18:33: Ooops. '-fast-redirects' is not among the final results.
> 2023-03-19 12:18:33: Failure for test 361. Sticky Actions: '-fast-redirects' and URL: 'https://collector.githubapp.com/github/page_view?dimensions[page]=https%3A%2F%2Fgithub.com%2Fopenbsd%2Fsrc%2Fblob%2F5ecdd0566b441ae0b99e73f410875e05dc0fa5b7%2Flib%2Flibc%2Finclude%2Fthread_private.h&dimensions[title]=src%2Fthread_private.h%20at%205ecdd0566b441ae0b99e73f410875e05dc0fa5b7%20%C2%B7%20openbsd%2Fsrc%20%C2%B7%20GitHub&dimensions[referrer]=https%3A%2F%2Fgithub.com%2Fopenbsd%2Fsrc%2Fsearch%3Fq%3D_MUTEX_LOCK%26unscoped_q%3D_MUTEX_LOCK&dimensions[user_agent]=Mozilla%2F5.0%20(X11%3B%20ElectroBSD%20amd64%3B%20rv%3A68.0)%20Gecko%2F20100101%20Firefox%2F68.0&dimensions[screen_resolution]=1366x768&dimensions[pixel_ratio]=1&dimensions[browser_resolution]=1362x636&dimensions[tz_seconds]=7200&dimensions[timestamp]=1591515169218&dimensions[referrer]=&dimensions[request_id]=22CA%3AE6F6%3A271ED2A%3A3839C5D%3A5EDB8295&dimensions[visitor_id]=5184934927058829974&dimensions[region_edge]=ams&dimensions[region_render]=ams&dimensions[user_id]=929183&dimensions[user_login]=openbsd&dimensions[repository_id]=66966208&dimensions[repository_nwo]=openbsd%2Fsrc&dimensions[repository_public]=true&dimensions[repository_is_fork]=false&dimensions[repository_network_root_id]=66966208&dimensions[repository_network_root_nwo]=openbsd%2Fsrc&dimensions[repository_explore_github_marketplace_ci_cta_shown]=false&&measures[performance_timing]=1-172-172-13996-12735-12426-12394-3858-172-172-172--13996-0---172-3853-3412-0--&&&dimensions[cid]=268614077.1591515169'
> 2023-03-19 12:18:34: Ooops. '-fast-redirects' is not among the final results.
> 2023-03-19 12:18:34: Failure for test 366. Sticky Actions: '-fast-redirects' and URL: 'http://ltfl.librarything.com//forlibraries/widget_response.php?id=1477&isbns=9780062279194&divs=ltfl_tagbrowse%2Cltfl_related%2Cltfl_similars%2Cltfl_series%2Cltfl_awards&lccn=&oclc=&t=1602093207304&systype=zones&pagetype=full&catalog_url=https%3A%2F%2Fkatalog.stbib-koeln.de%2Falswww2.dll%2FAPS_PRESENT_BIB%3FStyle%3DPortal3%26SubStyle%3D%26Lang%3DGER%26ResponseEncoding%3Dutf-8%26no%3DT011006751%26Via%3DZ3950%26View%3DAnnotated%26Parent%3DObj_482831602093137%26SearchBrowseList%3DObj_482831602093137%26SearchBrowseListItem%3D71831%26BrowseList%3DObj_482831602093137%3FStyle%3DPortal3%26SubStyle%3D%26Lang%3DGER%26ResponseEncoding%3Dutf-8%26BrowseListItem%3D71831%26QueryObject%3DObj_482811602093136&title=Think%20like%20a%20freak&author=Levitt%2C%20Steven%20D.&accession=T011006751&locations=&widget_response_loaded_after=764&container_widthAAS={%22body%22:{%22cw%22:1350,%22ch%22:946},%22ltfl_tagbrowse%22:{%22cw%22:614,%22ch%22:0},%22ltfl_related%22:{%22cw%22:614,%22ch%22:0},%22ltfl_similars%22:{%22cw%22:614,%22ch%22:0},%22ltfl_series%22:{%22cw%22:614,%22ch%22:0},%22ltfl_awards%22:{%22cw%22:614,%22ch%22:0}}'
> 2023-03-19 12:18:34: Ooops. '-fast-redirects' is not among the final results.
> 2023-03-19 12:18:34: Failure for test 369. Sticky Actions: '-fast-redirects' and URL: 'https://consent2.ksta.de/wrapper/tcfv2/v1/gdpr/native-message?requestUUID=56b465b7-5da2-44f0-83aa-aa50687d364f&hasCsp=true&env=prod&consentLanguage=browserDefault&body=%7B%22accountId%22%3A995%2C%22requestUUID%22%3A%2256b465b7-5da2-44f0-83aa-aa50687d364f%22%2C%22propertyHref%22%3A%22https%3A%2F%2Fwww.ksta.de%2Fhtml%2Fdumont-consent%2Findex.html%3Fparam%3DeyJyZWRpcmVjdFVybCI6Ii9yYXRnZWJlci9kaWdpdGFsL3BsYXR0Zm9ybS1tb29kbGUtc3RyZWlrdC11bnphZWhsaWdlLXNjaHVlbGVyLWluLW5ydy1rb2VubmVuLWFtLW1vbnRhZy1uaWNodC1hcmJlaXRlbi0zNzkxMzY0MD9jYj0xNjEwMzY1Njc4NjY3IiwicmVmZXJyZXIiOiIifQ%3D%3D%22%2C%22euconsent%22%3Anull%2C%22meta%22%3A%22%7B%5C%22mmsCookies%5C%22%3A%5B%5C%22_sp_enable_dfp_personalized_ads%3Dfalse%3B%5C%22%5D%2C%5C%22resolved%5C%22%3Anull%7D%22%2C%22clientMMSOrigin%22%3A%22https%3A%2F%2Fconsent2.ksta.de%22%2C%22targetingParams%22%3A%22%7B%5C%22mode%5C%22%3A%5C%22dumont-consent-message%5C%22%7D%22%2C%22campaignEnv%22%3A%22prod%22%2C%22pubData%22%3A%7B%7D%7D'
> 2023-03-19 12:18:34: Ooops. '-fast-redirects' is not among the final results.
> 2023-03-19 12:18:34: Failure for test 373. Sticky Actions: '-fast-redirects' and URL: 'https://login.microsoftonline.com/common/oauth2/authorize?client_id=00000006-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code%20id_token&scope=openid%20profile&state=OpenIdConnect.AuthenticationProperties%3DPVPUdMPDQIWzMIsGOsfeSSwP9nHxMVzXDpwiEjukrVUCKS8OhdDdPhwWoL-M6sb8ft25tA0k8CUQIi-GyfgdmiNoSPRaGCiGLfB8TnvS5OR-1ri16BlPJrQzzv9yBIv_IkuFid0AvW5PYlXFpg1kgByUkEkVfnMK1_bOTPU7CpI&nonce=637504532331900462.Y2Y0YzJhYjEtYTdkMS00NTI1LTgxNDMtYjBhY2NmNWQ4MDg4NWQ5ODY4ZjItMzBjZi00Nzk5LTgzMDAtOGNmMjg5ZThhZmM1&redirect_uri=https%3A%2F%2Fportal.microsoft.com%2Flanding&ui_locales=pl-PL&mkt=pl-PL&client-request-id=843ff515-5e48-4fa8-a22b-edd72858073a&x-client-SKU=ID_NET45&x-client-ver=6.6.0.0'
> 2023-03-19 12:18:38: Ooops. '-block' is not among the final results.
> 2023-03-19 12:18:38: Ooops. '-filter' is not among the final results.
> 2023-03-19 12:18:38: Failure for test 462. Sticky Actions: '-block -filter' and URL: 'http://l.yimg.com/g/combo/1?event-custom/event-custom-min.js&event/event-min.js&j/.H-.K.A.vNKEa&j/.CP-.U-.DE.A.vKEJz&j/.J_.BR_.CA.A.vKYkg&j/.J_.DB.A.vPpBT&j/popup-login.A.vR53Z&dump/dump-min.js&datatype/datatype-xml-min.js&substitute/substitute-min.js&json/json-min.js&queue-promote/queue-promote-min.js&io/io-min.js&j/.J_.DS.A.vQa28&j/.FW-.FX-.GH.A.vP3XB&j/grease.A.vRktP&j/.CC.A.vNiA6&j/.C-.BL.A.vPPj2&j/.CE-.K.A.vNy32&attribute/attribute-base-min.js&base/base-min.js&anim/anim-min.js&cookie/cookie-min.js&j/.B-.C-.F.A.vQ7SZ&j/urls.A.vQtXp&j/.B-.BY.A.vQCXP&j/.H-.BY.A.vQXXx&j/.DS-value-conversions.A.vQpRt&j/.G-.BD.A.vNHSH&event/event-synthetic-min.js&j/.G-.BO.A.vNwR4&j/.CV-.CH.A.vPFSZ&j/.X-.W-.C-.F.A.vKPQa&j/.X-.W-.D.A.vQXXx&j/.Q-.BX-.K.A.vR1kt&j/.DL.A.vLPjD&j/.CF.A.vNC24&j/.CX-.CY.A.vP8ND&event-simulate/event-simulate-min.js&node/node-event-simulate-min.js&j/.B-.T-.CI-.C-.F.A.vPJPF&j/.CM/.BA_2.5.1-.D.A.vPzui&j/bo-.S-.C-.F.A.vNwWe&j/bo-.S-.D.A.vR6Hx&j/.BZ-.D.A.vNstB&j/.B-.L-.C-.F.A.vNxPX&j/.B-.L-.BH.A.vMdVB&j/.CN-.DD.A.vLjJ2&j/.B-.O-.C-.F.A.vPpcK&j/.BM.A.vKPmz&j/.B-.O.A.vQyHg&j/.B-.H-.BB-.C-.F.A.vQvrB&j/.CW-.CU.A.vQ7Rg&j/.Y-.C-.F.A.vNqGa&j/.Y.A.vLKiT&j/.B-.M-.C-.F.A.vQxDc&j/.U-.CG.A.vQ5Tt&j/.B-.M.A.vQXXx&j/.B-.Q-.BQ.A.vQvTt&j/.B-.N-.C-.F.A.vQaRp&j/.CL.A.vN4N6&j/.B-.CL-.BW.A.vPwkx&j/.DR-.DG.A.vMLJr&j/.B-.BE-.C-.F.A.vPHP4&j/.B-.BE-.D.A.vQLQH&j/.BV.A.vm3Uz&j/.Z-.DK-.D.A.vLQEe&j/.Z-.DJ-.BJ.A.vLQEe&j/.B-.I-.C-.F.A.vPKTK&stylesheet/stylesheet-min.js&j/.B-.I.A.vQvDF&j/.CM-.DO.A.vPboD&j/.B-.D.A.vRbv8&j/.B-.H-.BB.A.vQuhn&j/.B-.N.A.vR6Cn&j/.B-.L-.CZ.A.vQmzP&j/.B-.T-.CI.A.vQXXx&j/.B-.I-.CQ-.BK-.C-.F.A.vNwZF&j/.B-.I-.CQ-.BK.A.vLWQR&j/.B-.R-.C-.F.A.vPfwi&j/.B-.R.A.vRhND&j/.DN-.BB-.D-.C-.F.A.vQXZg&j/.DN-.BB-.D.A.vRcXB&j/.BF_.D-.C-.F.A.vPGYM&j/.BF_.D.A.vQxJn&plugin/plugin-min.js&cache/cache-min.js&j/.CB-.C-.F.A.vNwWe&j/.CB-.D.A.vQS6T'
> 2023-03-19 12:18:38: Executed 452 regression tests. Skipped 17. 439 successes, 13 failures.


Thanks,
Gagan

> On Mar 19, 2023, at 7:49 AM, Gagan Sidhu <broly at mac.com> wrote:
> 
> your previous message has me thinking about ’stack corruption’. it’s possible that the discovery below is related to that.
> 
> problem is i don’t know how to fix it, nor do i know how a change in library could cause this.
> 
> isn’t possible that most of the problems ‘downstream’ are a result of the issue below? 
> 	-the wrong size for the subject string would seem to screw up a lot of things, no?
> 
>> 
> by the way, i have updated the patch since the JIT macro check was wrong.
> 
> the latest sha256 for the sourceforge attachment is now 9ed41077f6d0c59b73ca1655bdc00f825049077c5bcd3879c6f0e967a3c2a163
> 
> Thanks,
> Gagan
> 
>> On Mar 18, 2023, at 4:04 PM, Gagan Sidhu <broly at mac.com> wrote:
>> 
>> whoops i forgot the last line in the pcre1 printout, so to be clear, this is what i’m getting:
>> 
>> pcre2:
>> 
>> 
>>> Process 42798 stopped
>>> * thread #2, stop reason = step over
>>>  frame #0: 0x000000010000dd12 privoxy`template_fill(template_ptr=0x00000001004005e8, exports=0x0000000100400530) at cgi.c:2040:13
>>> 2037	   /*
>>> 2038	    * Assemble pcrs joblist from exports map
>>> 2039	    */
>>> -> 2040	   for (m = exports->first; m != NULL; m = m->next)
>>> 2041	   {
>>> 2042	      if (*m->name == '$')
>>> 2043	      {
>>> Target 0: (privoxy) stopped.
>>> (lldb) print size
>>> (size_t) $7 = 1
>>> (lldb) print strlen(file_buffer)
>>> error: 'strlen' has unknown return type; cast the call to its declared return type
>>> (lldb) print (size_t) strlen(file_buffer)
>>> (size_t) $8 = 15987
>>> (lldb) print (size_t) strlen(file_buffer) + 1
>>> (unsigned long) $9 = 15988
>> 
>> 
>> pcre1:
>>> Process 42869 stopped
>>> * thread #2, stop reason = step over
>>>   frame #0: 0x000000010000db0f privoxy`template_fill(template_ptr=0x00000001007001b8, exports=0x0000000100700170) at cgi.c:2040:13
>>>  2037	   /*
>>>  2038	    * Assemble pcrs joblist from exports map
>>>  2039	    */
>>> -> 2040	   for (m = exports->first; m != NULL; m = m->next)
>>>  2041	   {
>>>  2042	      if (*m->name == '$')
>>>  2043	      {
>>> Target 0: (privoxy) stopped.
>>> (lldb) print size
>>> (size_t) $1 = 15988
>> 
>>> (lldb) print strlen(file_buffer)
>>> error: 'strlen' has unknown return type; cast the call to its declared return type
>>> (lldb) print (size_t) strlen(file_buffer)
>>> (size_t) $2 = 15987
>>> (lldb) print (size_t) strlen(file_buffer) + 1
>>> (unsigned long) $3 = 15988
>> 
>> Thanks,
>> Gagan
>> 
>>> On Mar 18, 2023, at 4:02 PM, Gagan Sidhu <broly at mac.com> wrote:
>>> 
>>> i am doing some stepping through, and everything looks okay, until we enter template_fill
>>> 
>>> from what i’m seeing (and you should check this on your end as well), this “super efficient” approach of using one variable to pass, and later-on store,  the result of pcrs_execute *MAY* be the problem.
>>> 	
>>>> int pcrs_execute(pcrs_job *job, const char *subject, size_t subject_length, char **result, size_t *result_length)
>>> 
>>> in pcre2:
>>>> Process 42798 stopped
>>>> * thread #2, stop reason = step over
>>>>  frame #0: 0x000000010000dd12 privoxy`template_fill(template_ptr=0x00000001004005e8, exports=0x0000000100400530) at cgi.c:2040:13
>>>> 2037	   /*
>>>> 2038	    * Assemble pcrs joblist from exports map
>>>> 2039	    */
>>>> -> 2040	   for (m = exports->first; m != NULL; m = m->next)
>>>> 2041	   {
>>>> 2042	      if (*m->name == '$')
>>>> 2043	      {
>>>> Target 0: (privoxy) stopped.
>>>> (lldb) print size
>>>> (size_t) $7 = 1
>>>> (lldb) print strlen(file_buffer)
>>>> error: 'strlen' has unknown return type; cast the call to its declared return type
>>>> (lldb) print (size_t) strlen(file_buffer)
>>>> (size_t) $8 = 15987
>>>> (lldb) print (size_t) strlen(file_buffer) + 1
>>>> (unsigned long) $9 = 15988
>>> 
>>> so, for some reason or another, lldb can print the strlen and display it, but the program is not reflecting this.
>>> 
>>> in the pcre1 version, no problem at all:
>>> 
>>>> Process 42869 stopped
>>>> * thread #2, stop reason = step over
>>>>  frame #0: 0x000000010000db0f privoxy`template_fill(template_ptr=0x00000001007001b8, exports=0x0000000100700170) at cgi.c:2040:13
>>>> 2037	   /*
>>>> 2038	    * Assemble pcrs joblist from exports map
>>>> 2039	    */
>>>> -> 2040	   for (m = exports->first; m != NULL; m = m->next)
>>>> 2041	   {
>>>> 2042	      if (*m->name == '$')
>>>> 2043	      {
>>>> Target 0: (privoxy) stopped.
>>> 
>>> i thank you for sharing your wisdom by immediately going to gdb, reminding me of its great value in these circumstances.
>>> 
>>> my proposal going forward:
>>> 
>>> 1. please reproduce my findings
>>> 2. produce a patch that is not “overly-economic” so that subject_length and result_length have their own memory
>>> 	-it’s possible the optimisations are causing the issue, i’m not sure.
>>> 
>>> in theory i don’t see why your approach is problematic for pcre2, this is why i’m thinking it’s some optimisation that clobbers the contents.
>>> 
>>> i guess the most important thing is the first step: can you reproduce my findings?
>>> 	-if you can, then we have found the problem and i think it’s an easy fix.
>>> 
>>> whatcha think fabez?
>>> 
>>> Thanks,
>>> Gagan
>>> 
>>> 
>> 
>> _______________________________________________
>> Privoxy-devel mailing list
>> Privoxy-devel at lists.privoxy.org
>> https://lists.privoxy.org/mailman/listinfo/privoxy-devel
> 
> _______________________________________________
> 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