summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2020-11-18 15:38:53 (GMT)
committerGitHub <noreply@github.com>2020-11-18 15:38:53 (GMT)
commit07f2adedf0940b06d136208ec386d69b7d2d5b43 (patch)
treed0b64e336c25ed40ca94e70f3363a31b633136a6 /Python
parent46f59ebd01e22cc6a56fd0691217318c1d801a49 (diff)
downloadcpython-07f2adedf0940b06d136208ec386d69b7d2d5b43.zip
cpython-07f2adedf0940b06d136208ec386d69b7d2d5b43.tar.gz
cpython-07f2adedf0940b06d136208ec386d69b7d2d5b43.tar.bz2
bpo-40998: Address compiler warnings found by ubsan (GH-20929)
Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 82ce4f1..9771951 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1644,7 +1644,6 @@ Py_FinalizeEx(void)
/* Get current thread state and interpreter pointer */
PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime);
- PyInterpreterState *interp = tstate->interp;
// Wrap up existing "threading"-module-created, non-daemon threads.
wait_for_thread_shutdown(tstate);
@@ -1667,13 +1666,13 @@ Py_FinalizeEx(void)
/* Copy the core config, PyInterpreterState_Delete() free
the core config memory */
#ifdef Py_REF_DEBUG
- int show_ref_count = interp->config.show_ref_count;
+ int show_ref_count = tstate->interp->config.show_ref_count;
#endif
#ifdef Py_TRACE_REFS
- int dump_refs = interp->config.dump_refs;
+ int dump_refs = tstate->interp->config.dump_refs;
#endif
#ifdef WITH_PYMALLOC
- int malloc_stats = interp->config.malloc_stats;
+ int malloc_stats = tstate->interp->config.malloc_stats;
#endif
/* Remaining daemon threads will automatically exit