Skip to content

Commit

Permalink
Mark _PyList_FromStackRefStealOnSuccess as escaping
Browse files Browse the repository at this point in the history
I think technically it's not escaping, because the only object that
can be decrefed is an exact list, which cannot execute arbitrary code
when it is destroyed. However, this seems less intrusive than trying to
special cases objects in the assert in `_Py_Dealloc` that checks for
non-null stackpointers.
  • Loading branch information
mpage committed Mar 3, 2025
1 parent 8a64a62 commit a7a2c50
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Tools/cases_generator/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ def has_error_without_pop(op: parser.CodeDef) -> bool:
"_PyGen_GetGeneratorFromFrame",
"_PyInterpreterState_GET",
"_PyList_AppendTakeRef",
"_PyList_FromStackRefStealOnSuccess",
"_PyList_ITEMS",
"_PyLong_CompactValue",
"_PyLong_DigitCount",
Expand Down

0 comments on commit a7a2c50

Please sign in to comment.