GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-126703: Fix possible use after free in pycfunction freelist by Fidget-Spinner · Pull Request #132319 · python/cpython

Conversation

@Fidget-Spinner

@Fidget-Spinner Fidget-Spinner commented Apr 9, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Use freelist for range object, iterator objects and other often used objects #126703

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vfdev-5 reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@Fidget-Spinner
Fix possible use after free in pycfunction freelist
c68d4f1
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 9, 2025
@Fidget-Spinner
Fidget-Spinner requested a review from eendebakpt April 9, 2025 13:45
@Fidget-Spinner Fidget-Spinner changed the title gh-128692: Fix possible use after free in pycfunction freelist gh-126703: Fix possible use after free in pycfunction freelist Apr 9, 2025
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2025

Copy link
Copy Markdown
Member Author

@hawkinsp does this look right to you?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
4fa1daf
hawkinsp
hawkinsp reviewed Apr 9, 2025
View reviewed changes
Comment thread Objects/methodobject.c Outdated
PyObject_ClearWeakRefs((PyObject*) m);
}
// We need to access ml_flags here rather than later.
// `m` might have the same lifetime

@hawkinsp hawkinsp Apr 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m->m_ml I think here, but yes.

You are also right that probably we should update the API documentation to clarify this is an acceptable thing to do.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Fidget-Spinner added 2 commits April 9, 2025 21:52
@Fidget-Spinner
Address review
088d3a4
@Fidget-Spinner
Merge branch 'freelist-fix' of github.com:Fidget-Spinner/cpython into…
7125b6a
… freelist-fix
@vfdev-5 vfdev-5 mentioned this pull request Apr 9, 2025
Added few known races tsan-suppressions_3.14.txt jax-ml/jax#27872
Closed
hawkinsp
hawkinsp approved these changes Apr 9, 2025
View reviewed changes
@Fidget-Spinner
Fidget-Spinner merged commit bd3aa0b into python:main Apr 9, 2025
@bedevere-app bedevere-app Bot removed the awaiting core review label Apr 9, 2025
@Fidget-Spinner
Fidget-Spinner deleted the freelist-fix branch April 9, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eendebakpt eendebakpt Awaiting requested review from eendebakpt
1 more reviewer
@hawkinsp hawkinsp hawkinsp approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Fidget-Spinner @hawkinsp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.