Skip to content

Legacy tracing & PY_UNWIND: arg of legacy tracer call should be NULL #110892

Closed
@jpe

Description

@jpe

Bug report

Bug description:

When using a legacy tracer with PyEval_SetTrace and a function exits with an exception, the arg of the tracer event PyTrace_RETURN should be NULL docs. Currently in 3.12 (& 3.13), the arg is set to the exception value because the PY_UNWIND handler is forwarding its arg to the legacy tracer function.

CPython versions tested on:

3.12

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

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