From d9a75744eeaa882e6203cdb864289a6534ac86c8 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 20 Feb 2017 23:43:15 -0800 Subject: [PATCH] reinit the TLS before anything else (#130) 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 1c888a598e9..5844a9a85e1 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 }