[Lldb-commits] [lldb] r203385 - Fix unwind_plan test conditions (could result in NULL memory access).

Virgile Bello virgile.bello at gmail.com
Sun Mar 9 03:01:25 PDT 2014


Author: xen2
Date: Sun Mar  9 05:01:25 2014
New Revision: 203385

URL: http://llvm.org/viewvc/llvm-project?rev=203385&view=rev
Log:
Fix unwind_plan test conditions (could result in NULL memory access).

Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=203385&r1=203384&r2=203385&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Sun Mar  9 05:01:25 2014
@@ -820,7 +820,7 @@ RegisterContextLLDB::GetFullUnwindPlanFo
     // We'd prefer to use an UnwindPlan intended for call sites when we're at a call site but if we've
     // struck out on that, fall back to using the non-call-site assembly inspection UnwindPlan if possible.
     unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtNonCallSite (m_thread);
-    if (unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo)
+    if (unwind_plan_sp && unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo)
     {
         // We probably have an UnwindPlan created by inspecting assembly instructions, and we probably
         // don't have any eh_frame instructions available.





More information about the lldb-commits mailing list