[Lldb-commits] [lldb] r350375 - [lldb] Check SafeToCallFunctions before calling functions in GetExceptionObjectForThread

Kuba Mracek via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 3 16:20:52 PST 2019


Author: kuba.brecka
Date: Thu Jan  3 16:20:52 2019
New Revision: 350375

URL: http://llvm.org/viewvc/llvm-project?rev=350375&view=rev
Log:
[lldb] Check SafeToCallFunctions before calling functions in GetExceptionObjectForThread

Differential Revision: https://reviews.llvm.org/D56115


Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=350375&r1=350374&r2=350375&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Thu Jan  3 16:20:52 2019
@@ -554,6 +554,9 @@ bool ItaniumABILanguageRuntime::Exceptio
 
 ValueObjectSP ItaniumABILanguageRuntime::GetExceptionObjectForThread(
     ThreadSP thread_sp) {
+  if (!thread_sp->SafeToCallFunctions())
+    return {};
+
   ClangASTContext *clang_ast_context =
       m_process->GetTarget().GetScratchClangASTContext();
   CompilerType voidstar =




More information about the lldb-commits mailing list