René's URL Explorer Experiment


Title: bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure · Pull Request #32223 · python/cpython · GitHub

Open Graph Title: bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure · Pull Request #32223 · python/cpython

X Title: bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure · Pull Request #32223 · python/cpython

Description: @serhiy-storchaka , please review the commits one by one. MSVC 2022 non-PGO release build, run test_re.py. It's a bit slower. (best of 10) Before: 0.278 sec After: 0.283 sec But when switching REPEAT very frequently, it has some speed up: import pyperf setup = ("import re;" "s = 100_000_000 * 'a';" "p = r'.*?(?:bb)+';" "p = re.compile(p)") stmt = "p.match(s)" runner = pyperf.Runner() runner.timeit("match", stmt=stmt, setup=setup) # Before: Mean +- std dev: 1.88 sec +- 0.03 sec # After: Mean +- std dev: 1.63 sec +- 0.03 sec https://bugs.python.org/issue23689

Open Graph Description: @serhiy-storchaka , please review the commits one by one. MSVC 2022 non-PGO release build, run test_re.py. It's a bit slower. (best of 10) Before: 0.278 sec After: 0.283 sec But when switchin...

X Description: @serhiy-storchaka , please review the commits one by one. MSVC 2022 non-PGO release build, run test_re.py. It's a bit slower. (best of 10) Before: 0.278 sec After: 0.283 sec But when swit...

Opengraph URL: https://github.com/python/cpython/pull/32223

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:06ebd7ee-2c07-5fdc-6a71-ecf70c28dbf8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id86C2:3CA024:85144:BC1CE:696A0C64
html-safe-nonce9a77dabe360080fc7f58d0f82fcd67b5ec46618d4c17885b1cc06ab3493fba38
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkMyOjNDQTAyNDo4NTE0NDpCQzFDRTo2OTZBMEM2NCIsInZpc2l0b3JfaWQiOiIyNTc4NDM4NzY1NTc4Njg1NTQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbef6821d2eb773f21546c8352daf33839a9f48c75cbd4f582d4bdbd719276a5f
hovercard-subject-tagpull_request:896954414
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/32223/files
twitter:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10137?s=400&v=4
og:image:alt@serhiy-storchaka , please review the commits one by one. MSVC 2022 non-PGO release build, run test_re.py. It's a bit slower. (best of 10) Before: 0.278 sec After: 0.283 sec But when switchin...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7266b2d935baa1c6474b16dd9feaa5ca30607261
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/32223/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F32223%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F32223%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/32223/files
Reloadhttps://github.com/python/cpython/pull/32223/files
Reloadhttps://github.com/python/cpython/pull/32223/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
ghosthttps://github.com/ghost
python:mainhttps://github.com/python/cpython/tree/main
Conversation 2 https://github.com/python/cpython/pull/32223
Commits 8 https://github.com/python/cpython/pull/32223/commits
Checks 0 https://github.com/python/cpython/pull/32223/checks
Files changed https://github.com/python/cpython/pull/32223/files
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure https://github.com/python/cpython/pull/32223/files#top
Show all changes 8 commits https://github.com/python/cpython/pull/32223/files
d43cefe 1. add variables wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/d43cefe2c17e962a6d66f2c165935eaa6d8c1012
f0d2621 2. add CompileData class to sre_compile.py wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/f0d2621cf316404c4cbe2b6d5887bc84bbb33148
b8b9921 3. add repeat_count parameter to _sre.compile() function wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/b8b99211d5e36b862510863bb094a8a63c0be798
17907f5 4. emit repeat_count in sre_compile.py wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/17907f5104ddf210a6f6896abaf414d56e06c042
787ca6f 5. change _validate_outer() parameter wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/787ca6f158d9f4db3b4692d0920bfbd66ed075eb
6ec932b 6. validate in _validate_inner() wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/6ec932b3fdd294345dc8df662e8d38676d7b45fe
01c4c29 7. allocate repeats_array for SRE_STATE wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/01c4c291c6c9e072c84017be181bc2353fdacb8b
7631b7d 8. support code in sre_lib.h wjssz Mar 31, 2022 https://github.com/python/cpython/pull/32223/commits/7631b7d8feced3044b4ba55516f41848e4c83def
Clear filters https://github.com/python/cpython/pull/32223/files
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
sre_compile.py https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
sre_constants.py https://github.com/python/cpython/pull/32223/files#diff-2809ceff33bbd4caf1c97444c63cc36d852b719bb417725ff6a2d6f9a448e386
test_re.py https://github.com/python/cpython/pull/32223/files#diff-8e462ca5167ec7a83a5710c179ef56cbae19cd614303fbcf2ec33fd9db914e2a
2022-03-31-21-08-41.bpo-23689.TFSc3E.rst https://github.com/python/cpython/pull/32223/files#diff-a49388955415594f1230a8e8f66847d42b8e7a71bf4f019caeb20d0d2db42833
_sre.c https://github.com/python/cpython/pull/32223/files#diff-aaff088141c53a1b4b5f0d9d35d0bbd0406bac50c73be47328df26f46c9fe41c
_sre.c.h https://github.com/python/cpython/pull/32223/files#diff-bdd554b9bc8d7f61bf3f7cd13d35585a571de31b0a4b24dba719b67d94374b9e
sre.h https://github.com/python/cpython/pull/32223/files#diff-39041e5cd265563ee9103fe4ab8a2dd1bcfaba8554f7dcbc827eb0538caf1819
sre_constants.h https://github.com/python/cpython/pull/32223/files#diff-fa3757d7529b86b657a4880fbfdc3c2c3aa9bd461422aa946f62b0d76904a7f7
sre_lib.h https://github.com/python/cpython/pull/32223/files#diff-4e6d447ab468fcfdf1a5a9d8343c00af6d8f79eafc3ff2886eac8409bfc05df6
Lib/sre_compile.pyhttps://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
View file https://github.com/python/cpython/blob/7631b7d8feced3044b4ba55516f41848e4c83def/Lib/sre_compile.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/32223/{{ revealButtonHref }}
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
https://github.com/python/cpython/pull/32223/files#diff-806633f92a864026d6c611735f1e2cbb063eb817ea1cca36e8d9f9bcf252baa6
Lib/sre_constants.pyhttps://github.com/python/cpython/pull/32223/files#diff-2809ceff33bbd4caf1c97444c63cc36d852b719bb417725ff6a2d6f9a448e386
View file https://github.com/python/cpython/blob/7631b7d8feced3044b4ba55516f41848e4c83def/Lib/sre_constants.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/32223/{{ revealButtonHref }}
https://github.com/python/cpython/pull/32223/files#diff-2809ceff33bbd4caf1c97444c63cc36d852b719bb417725ff6a2d6f9a448e386
https://github.com/python/cpython/pull/32223/files#diff-2809ceff33bbd4caf1c97444c63cc36d852b719bb417725ff6a2d6f9a448e386
Lib/test/test_re.pyhttps://github.com/python/cpython/pull/32223/files#diff-8e462ca5167ec7a83a5710c179ef56cbae19cd614303fbcf2ec33fd9db914e2a
View file https://github.com/python/cpython/blob/7631b7d8feced3044b4ba55516f41848e4c83def/Lib/test/test_re.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/32223/{{ revealButtonHref }}
https://github.com/python/cpython/pull/32223/files#diff-8e462ca5167ec7a83a5710c179ef56cbae19cd614303fbcf2ec33fd9db914e2a
https://github.com/python/cpython/pull/32223/files#diff-8e462ca5167ec7a83a5710c179ef56cbae19cd614303fbcf2ec33fd9db914e2a
Misc/NEWS.d/next/Library/2022-03-31-21-08-41.bpo-23689.TFSc3E.rsthttps://github.com/python/cpython/pull/32223/files#diff-a49388955415594f1230a8e8f66847d42b8e7a71bf4f019caeb20d0d2db42833
View file https://github.com/python/cpython/blob/7631b7d8feced3044b4ba55516f41848e4c83def/Misc/NEWS.d/next/Library/2022-03-31-21-08-41.bpo-23689.TFSc3E.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/32223/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/32223/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.