Skip to content

Commit aff400a

Browse files
committed
add disclaimer for leaks in codegen_deferred_annotations_body
1 parent 089c19b commit aff400a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/codegen.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ codegen_deferred_annotations_body(compiler *c, location loc,
798798
if (!mangled) {
799799
return ERROR;
800800
}
801+
// NOTE: ref of mangled can be leaked on ADDOP* and VISIT macros due to early returns
802+
// fixing would require an overhaul of these macros
803+
801804
PyObject *cond_index = PyList_GET_ITEM(conditional_annotation_indices, i);
802805
assert(PyLong_CheckExact(cond_index));
803806
long idx = PyLong_AS_LONG(cond_index);

0 commit comments

Comments
 (0)