Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add disclaimer for leaks in codegen_deferred_annotations_body
  • Loading branch information
A0su committed Mar 26, 2026
commit aff400a0b6ffe5e95caf56e3839019674f6c0682
3 changes: 3 additions & 0 deletions Python/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@ codegen_deferred_annotations_body(compiler *c, location loc,
if (!mangled) {
return ERROR;
}
// NOTE: ref of mangled can be leaked on ADDOP* and VISIT macros due to early returns
// fixing would require an overhaul of these macros

PyObject *cond_index = PyList_GET_ITEM(conditional_annotation_indices, i);
assert(PyLong_CheckExact(cond_index));
long idx = PyLong_AS_LONG(cond_index);
Expand Down
Loading