You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my mac M1 Sonoma (14.5), Python 3.13.0b4, I see this crash when registering an opcode monitor, calling the handler explicitly while it's enabled, and then restarting events. To reproduce:
importsysdefmymonitor(code, instruction_offset):
passtool_id=4sys.monitoring.use_tool_id(tool_id, "mytool")
sys.monitoring.register_callback(
tool_id,
sys.monitoring.events.INSTRUCTION,
mymonitor,
)
sys.monitoring.set_events(tool_id, sys.monitoring.events.INSTRUCTION)
mymonitor(None, 0) # call the *same* handler while it is registered sys.monitoring.restart_events()
Triggers an assertion failure (my minimal debugging suggests it's about some inconsistency with the "instrumentation_version"):
$ 3.13.0b4-debug/bin/python -X dev repro.py
Assertion failed: (debug_check_sanity(tstate->interp, code)), function _Py_call_instrumentation_instruction, file instrumentation.c, line 1347.
Fatal Python error: Aborted
Current thread 0x00000002064b0c00 (most recent call first):
File "/Users/phillipschanely/proj/CrossHair/repro.py", line 4 in mymonitor
File "/Users/phillipschanely/proj/CrossHair/repro.py", line 16 in <module>
zsh: abort /Users/phillipschanely/.pyenv/versions/3.13.0b4-debug/bin/python -X dev
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
On my mac M1 Sonoma (14.5), Python 3.13.0b4, I see this crash when registering an opcode monitor, calling the handler explicitly while it's enabled, and then restarting events. To reproduce:
Triggers an assertion failure (my minimal debugging suggests it's about some inconsistency with the "instrumentation_version"):
Thanks for investigating!
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: