Skip to content

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

Closed
@jpe

Description

@jpe

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.

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions