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-100227: Add Missing Locks for Specific Global Runtime State by ericsnowcurrently · Pull Request #105470 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Jun 7, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

We add the locks for the global atexit state, the global list of audit hooks, and the global allocators. The risk of a race is low in each case, but playing it safe mostly isn't a problem. (We do avoid using the allocator lock in performance-sensitive cases where the risk of a race is very, very low.)

  • Issue: Improve Interpreter Isolation #100227

Sorry, something went wrong.

Uh oh!

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

All reactions
ericsnowcurrently added 5 commits June 6, 2023 18:12
@ericsnowcurrently
Factor out LOCKS_INIT().
d87a2d7
@ericsnowcurrently
Add a granular lock for global atexit state.
95a9f15
@ericsnowcurrently
Factor out _PyRuntimeState.audit_hooks.
0cc4ffe
@ericsnowcurrently
Add a granular lock for global audit hooks state.
605936f
@ericsnowcurrently
Add a granular lock for global allocators state.
1382ad6
@ericsnowcurrently ericsnowcurrently added skip news needs backport to 3.12 only security fixes labels Jun 7, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jun 7, 2023
Improve Interpreter Isolation #100227
Closed
ericsnowcurrently added 2 commits June 7, 2023 15:45
@ericsnowcurrently
Fix usage of the audit hooks lock.
70303d1
@ericsnowcurrently
Fix some function signatures.
405a905
@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review June 7, 2023 23:15
@bedevere-bot bedevere-bot added the awaiting core review label Jun 7, 2023
@ericsnowcurrently

ericsnowcurrently commented Jun 8, 2023

Copy link
Copy Markdown
Member Author

I've split this up into 3 PRs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericsnowcurrently ericsnowcurrently closed this Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review needs backport to 3.12 only security fixes skip news

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

@ericsnowcurrently @bedevere-bot
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 01402503 — 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.