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
{{ message }}
Repository navigation
Existing INSTRUCTION callbacks can be dropped when a second monitoring tool is added #157900
Expected both tools to see the same instructions. Actual output is:
[0, 8]
The transition from single-tool to multi-tool monitoring allocates per_instruction_tools, but the new table starts empty even at locations that are already instrumented for the existing tool. Once the table exists, instruction dispatch uses it instead of the global/local tool union, so the existing tool is lost at those locations.
This also shows up when sys.settrace() enables opcode tracing while another monitoring tool is active: the first opcode event is missed. I originally reduced this from coveragepy/coveragepy#2095.
CPython versions tested on
CPython main branch (b426caa), Python 3.15.0rc2, Python 3.14.7.
Activity
pythongh-157900: Preserve per-instruction tools in multi-tool monitoring
Fall back to process-wide instruction events beside another instructi…
Fall back to process-wide instruction events beside another instructi…
Fall back to process-wide instruction events beside another instructi…
Fall back to process-wide instruction events beside another instructi…