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-144774: Add critical section in `BaseException.__setstate__` by brijkapadia · Pull Request #150578 · python/cpython

Conversation

@brijkapadia

@brijkapadia brijkapadia commented May 29, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Adds a critical section to prevent a data race in exceptions.c.
Unsure if the test is in the right location.
I don't think that a news entry is necessary.

  • Issue: TSAN alarm in dictobject.c while using setattr #144774

Sorry, something went wrong.

Uh oh!

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

All reactions
@brijkapadia
pythongh-144774: Add critical section in exceptions.c with `PyDict_…
dc97cd1
…Next`
@brijkapadia
brijkapadia requested a review from iritkatriel as a code owner May 29, 2026 14:24
@bedevere-app bedevere-app Bot mentioned this pull request May 29, 2026
TSAN alarm in dictobject.c while using setattr #144774
Closed
@bedevere-app bedevere-app Bot added the awaiting review label May 29, 2026
kumaraditya303
kumaraditya303 reviewed May 29, 2026
View reviewed changes
Comment thread Objects/exceptions.c Resolved

Uh oh!

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

@brijkapadia
move critical section into arg clinic
65d4d18
colesbury
colesbury reviewed May 29, 2026
View reviewed changes
Comment thread Objects/exceptions.c Resolved

Uh oh!

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

@picnixz picnixz changed the title gh-144774: Add critical section in exceptions.c with PyDict_Next gh-144774: Add critical section in BaseException.__setstate__ May 29, 2026
@picnixz

picnixz commented May 29, 2026

Copy link
Copy Markdown
Member

I don't think that a news entry is necessary.

Usually a bug fix always includes a NEWS entry, at least to indicate that a crash has been fixed. In this case, it's a data race that has been fixed when an exception is being copied while being mutated.

brijkapadia reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@brijkapadia @colesbury
Update Objects/exceptions.c
4972586
Co-authored-by: Sam Gross <[email protected]>
colesbury
colesbury reviewed May 29, 2026
View reviewed changes
Comment thread Lib/test/test_exceptions.py Resolved

Uh oh!

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

colesbury
colesbury reviewed May 29, 2026
View reviewed changes
Comment thread Lib/test/test_exceptions.py Resolved

Uh oh!

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

blurb-it Bot and others added 3 commits May 29, 2026 17:51
@blurb-it
📜🤖 Added by blurb_it.
daa45fe
@brijkapadia
Update test
b39087a
@brijkapadia
Update NEWS
fdc8bdf
brijkapadia
brijkapadia commented May 29, 2026
View reviewed changes
Comment thread Lib/test/test_exceptions.py Resolved

Uh oh!

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

@brijkapadia
fix stray change
3ea8fe4
kumaraditya303
kumaraditya303 approved these changes May 30, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 30, 2026
@kumaraditya303

kumaraditya303 commented May 30, 2026

Copy link
Copy Markdown
Contributor

You need to do make regen-clinic again.

All reactions

Sorry, something went wrong.

Uh oh!

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

brijkapadia added 2 commits May 30, 2026 08:44
@brijkapadia
Update generated files
cebc239
@brijkapadia
Update news
0627679
kumaraditya303
kumaraditya303 approved these changes May 30, 2026
View reviewed changes
@kumaraditya303
kumaraditya303 merged commit f586fd9 into python:main May 30, 2026
55 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label May 30, 2026
@brijkapadia
brijkapadia deleted the exception-data-race branch May 30, 2026 15:57
@nascheme nascheme mentioned this pull request Jul 14, 2026
Backport free-threading memory-safety fixes to 3.14 and 3.15 #153714
Closed
@kumaraditya303 kumaraditya303 added the needs backport to 3.15 bugs and security fixes label Jul 15, 2026
@miss-islington-app

miss-islington-app Bot commented Jul 15, 2026

Copy link
Copy Markdown

Thanks @brijkapadia for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Jul 15, 2026

Copy link
Copy Markdown

GH-153746 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jul 15, 2026
kumaraditya303 pushed a commit that referenced this pull request Jul 15, 2026
@miss-islington @brijkapadia
[3.15] gh-144774: Add critical section in BaseException.__setstate__ (
25eb043
GH-150578) (#153746)

gh-144774: Add critical section in `BaseException.__setstate__` (GH-150578)
(cherry picked from commit f586fd9)

Co-authored-by: Brij Kapadia <[email protected]>
@bedevere-app

bedevere-app Bot commented Jul 16, 2026

Copy link
Copy Markdown

GH-153819 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

nascheme added a commit that referenced this pull request Jul 17, 2026
@nascheme @brijkapadia
[3.14] gh-144774: Add critical section in BaseException.__setstate__ (
9a8d756
GH-150578) (GH-153819)

(cherry picked from commit f586fd9)

Co-authored-by: Brij Kapadia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@colesbury colesbury colesbury left review comments
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@iritkatriel iritkatriel Awaiting requested review from iritkatriel iritkatriel is a code owner

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.

4 participants

@brijkapadia @picnixz @kumaraditya303 @colesbury
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.