From 83106ee493dac6694bf823a578bbf24f308d23eb Mon Sep 17 00:00:00 2001 From: zhangzhaoju Date: Fri, 28 May 2021 16:15:22 +0800 Subject: [PATCH] resolve ms_fucntion coredump while input invalide. --- mindspore/ccsrc/pipeline/jit/pipeline.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mindspore/ccsrc/pipeline/jit/pipeline.cc b/mindspore/ccsrc/pipeline/jit/pipeline.cc index dc1abce22e6..7f693b0178c 100644 --- a/mindspore/ccsrc/pipeline/jit/pipeline.cc +++ b/mindspore/ccsrc/pipeline/jit/pipeline.cc @@ -1192,6 +1192,13 @@ void ClearResAtexit() { #ifdef ENABLE_DEBUGGER Debugger::GetInstance()->Reset(); #endif + g_args_cache.clear(); + // clean static variable to prevent from crash. As static variable is released after + // Python threads is released. + parse::data_converter::ClearObjectCache(); + parse::Parser::CleanParserResource(); + parse::CleanDataClassToClassMap(); + trace::ClearTraceStack(); } } // namespace pipeline } // namespace mindspore