-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Refactor codegen_deferred_annotations_body to ensure mangled is decref'd #148059
Copy link
Copy link
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Follow-up item from this PR: #146443 (review)
During error cases we may fail to decref mangled while using these ADDOP* and VISIT macros. As a result, we can extract the for loop's body into a subfunction that we check the return of and decref mangled if needed.
// NOTE: ref of mangled can be leaked on ADDOP* and VISIT macros due to early returns
// fixing would require an overhaul of these macrosCPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error