8000 [3.13] Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject (GH-127910) by miss-islington · Pull Request #128006 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.13] Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject (GH-127910) #128006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
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
Free arena on _PyCompile_AstOptimize failure in Py_CompileStringObject (
GH-127910)

After commit 10a91d7 introduced arena cleanup, commit 2dfbd4f
removed the free call when _PyCompile_AstOptimize fails.
(cherry picked from commit cfeaa99)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
  • Loading branch information
berkerpeksag authored and miss-islington committed Dec 16, 2024
commit 513758092a4aeefa41b2ff253739d635ad4be828
1 change: 1 addition & 0 deletions Python/pythonrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ Py_CompileStringObject(const char *str, PyObject *filename, int start,
if (flags && (flags->cf_flags & PyCF_ONLY_AST)) {
if ((flags->cf_flags & PyCF_OPTIMIZED_AST) == PyCF_OPTIMIZED_AST) {
if (_PyCompile_AstOptimize(mod, filename, flags, optimize, arena) < 0) {
_PyArena_Free(arena);
return NULL;
}
}
Expand Down
Loading
0