[Lldb-commits] [PATCH] D128378: [lldb] Return the correct utility function in AppleObjCRuntimeV2

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 22 13:45:30 PDT 2022


JDevlieghere created this revision.
JDevlieghere added a reviewer: aprantl.
Herald added a project: All.
JDevlieghere requested review of this revision.

A copy/paste error in GetClassInfoUtilityFunction resulted in the wrong
utility function being returned: copyRealizedClassList instead of
getRealizedClassList_trylock.


https://reviews.llvm.org/D128378

Files:
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp


Index: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1700,11 +1700,11 @@
   }
   case objc_getRealizedClassList_trylock: {
     if (!m_objc_getRealizedClassList_trylock_helper.utility_function)
-      m_objc_copyRealizedClassList_helper.utility_function =
+      m_objc_getRealizedClassList_trylock_helper.utility_function =
           GetClassInfoUtilityFunctionImpl(exe_ctx, helper,
                                           g_get_dynamic_class_info3_body,
                                           g_get_dynamic_class_info3_name);
-    return m_objc_copyRealizedClassList_helper.utility_function.get();
+    return m_objc_getRealizedClassList_trylock_helper.utility_function.get();
   }
   }
   llvm_unreachable("Unexpected helper");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128378.439145.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220622/ab86b2d5/attachment.bin>


More information about the lldb-commits mailing list