Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised in sys.monitoring EXCEPTION_HANDLED callback triggers an assert (3.12b4) #106896

Closed
jpe opened this issue Jul 19, 2023 · 1 comment
Assignees
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes type-bug An unexpected behavior, bug, or error

Comments

@jpe
Copy link

jpe commented Jul 19, 2023

An exception raised in a EXCEPTION_HANDLED callback triggers an assert in a debug build of 3.12b4. I was using the following incorrect signature for a callback method and registering it as a bound method --

def _py_handled_event(self, instruction_offset: int, exception: BaseException):

This was my mistake (it was a simple oversight while editing) but it the calling code should handle the exception without crashing.

I mentioned this in #103082 but was encouraged to create a separate bug for it.

@jpe jpe added the type-bug An unexpected behavior, bug, or error label Jul 19, 2023
@AlexWaygood AlexWaygood added type-bug An unexpected behavior, bug, or error and removed type-bug An unexpected behavior, bug, or error labels Jul 19, 2023
@AlexWaygood AlexWaygood added 3.12 bugs and security fixes 3.13 bugs and security fixes labels Jul 19, 2023
@markshannon
Copy link
Member

This was fixed as a side effect of fixing #106895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants