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 — bpo-46025: Fix a crash in the atexit module for auto-unregistering functions by pablogsal · Pull Request #30002 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented Dec 9, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue46025

Sorry, something went wrong.

Uh oh!

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

All reactions
@pablogsal pablogsal added the 🤖 automerge label Dec 9, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Dec 9, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Dec 9, 2021
@pablogsal pablogsal added the needs backport to 3.10 label Dec 9, 2021
@pablogsal
pablogsal requested a review from vstinner December 9, 2021 11:43
@pablogsal
pablogsal force-pushed the bpo-46025 branch from ebb3661 to e7cccf4 Compare December 9, 2021 11:45
@pablogsal
bpo-46025: Fix a crash in the atexit module for auto-unregistering fu…
002b033
…nctions
@pablogsal
pablogsal force-pushed the bpo-46025 branch from e7cccf4 to 002b033 Compare December 9, 2021 11:51
vstinner
vstinner reviewed Dec 9, 2021
View reviewed changes
Comment thread Modules/atexitmodule.c Resolved

Uh oh!

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

Comment thread Lib/test/_test_atexit.py Resolved

Uh oh!

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

tiran
tiran reviewed Dec 9, 2021
View reviewed changes
Comment thread Modules/atexitmodule.c Resolved

Uh oh!

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

pablogsal and others added 2 commits December 9, 2021 13:16
@pablogsal @vstinner
Update Modules/atexitmodule.c
ebc949b
Co-authored-by: Victor Stinner <[email protected]>
@pablogsal @tiran
Update Modules/atexitmodule.c
ec3741e
Co-authored-by: Christian Heimes <[email protected]>
@pablogsal
pablogsal force-pushed the bpo-46025 branch from 121a6e7 to ec3741e Compare December 9, 2021 13:19
vstinner
vstinner approved these changes Dec 9, 2021
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

LGTM. Thanks, I'm feeling more confident with catch_unraisable_exception.

I'm surprised that no other atexit uses catch_unraisable_exception.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/_test_atexit.py
atexit._run_exitfuncs()
self.assertEqual(cm.unraisable.object, func)
self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError)
self.assertEqual(type(cm.unraisable.exc_value), ZeroDivisionError)

@vstinner vstinner Dec 9, 2021

Copy link
Copy Markdown
Member

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.

Not sure if checking exc_value is needed, but it's ok to test it :-)

Sorry, something went wrong.

Uh oh!

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

All reactions

@pablogsal pablogsal Dec 9, 2021

Copy link
Copy Markdown
Member Author

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.

This makes it a military-grade test :)

Sorry, something went wrong.

Uh oh!

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

vstinner reacted with thumbs up emoji vstinner reacted with hooray emoji vstinner reacted with heart emoji vstinner reacted with rocket emoji vstinner reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
  • ❤️ 1 reaction
  • 🚀 1 reaction
  • 👀 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Dec 9, 2021
@miss-islington

miss-islington commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

@pablogsal: Status check is done, and it's a failure ❌ .

All reactions

Sorry, something went wrong.

Uh oh!

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

1 similar comment
@miss-islington

miss-islington commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

@pablogsal: Status check is done, and it's a failure ❌ .

All reactions

Sorry, something went wrong.

Uh oh!

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

@pablogsal
pablogsal merged commit f0d290d into python:main Dec 9, 2021
@pablogsal
pablogsal deleted the bpo-46025 branch December 9, 2021 13:53
@miss-islington

miss-islington commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Dec 9, 2021
@bedevere-bot

bedevere-bot commented Dec 9, 2021

Copy link
Copy Markdown

GH-30005 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Dec 9, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 9, 2021
@pablogsal @miss-islington
bpo-46025: Fix a crash in the atexit module for auto-unregistering fu…
fa787ef
…nctions (pythonGH-30002)

(cherry picked from commit f0d290d)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal added a commit that referenced this pull request Dec 9, 2021
@miss-islington @pablogsal
bpo-46025: Fix a crash in the atexit module for auto-unregistering fu…
934a24c
…nctions (GH-30002) (GH-30005)

(cherry picked from commit f0d290d)

Co-authored-by: Pablo Galindo Salgado <[email protected]>

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@vstinner

vstinner commented Dec 9, 2021

Copy link
Copy Markdown
Member

Thanks for the fix ;-)

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland mentioned this pull request Jul 17, 2024
Use-after-free in unregister() of atexit module #112127
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
+1 more reviewer
@tiran tiran tiran left review comments
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.

6 participants

@pablogsal @miss-islington @bedevere-bot @vstinner @tiran @the-knights-who-say-ni
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.