From db44b8848f88ee3fa48122ceb88268665a975e26 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 15 Feb 2017 23:31:42 -0800 Subject: [PATCH] reinit the TLS before anything else PyEval_ReInitThread can run arbitrary Python code, which really ought to have the TLS initialized. --- Parser/intrcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c index 1c888a598e9d03..5844a9a85e16c5 100644 --- a/Parser/intrcheck.c +++ b/Parser/intrcheck.c @@ -172,7 +172,7 @@ void PyOS_AfterFork(void) { #ifdef WITH_THREAD - PyEval_ReInitThreads(); PyThread_ReInitTLS(); + PyEval_ReInitThreads(); #endif }