diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-04-11-18-44-19.gh-issue-89455.d0qMYd.rst b/Misc/NEWS.d/next/Core and Builtins/2022-04-11-18-44-19.gh-issue-89455.d0qMYd.rst new file mode 100644 index 00000000000000..e22b4ac44c096c --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-04-11-18-44-19.gh-issue-89455.d0qMYd.rst @@ -0,0 +1,2 @@ +Fixed an uninitialized bool value in the traceback printing code path that +was introduced by the initial bpo-45292 exception groups work. diff --git a/Python/pythonrun.c b/Python/pythonrun.c index d117b790dfdaae..e086f0f345c222 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1504,6 +1504,7 @@ _PyErr_Display(PyObject *file, PyObject *exception, PyObject *value, PyObject *t struct exception_print_context ctx; ctx.file = file; ctx.exception_group_depth = 0; + ctx.need_close = false; ctx.max_group_width = PyErr_MAX_GROUP_WIDTH; ctx.max_group_depth = PyErr_MAX_GROUP_DEPTH;