This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Return the correct utility function in AppleObjCRuntimeV2
ClosedPublic

Authored by JDevlieghere on Jun 22 2022, 1:45 PM.

Details

Summary

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

Diff Detail

Event Timeline

JDevlieghere created this revision.Jun 22 2022, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2022, 1:45 PM
JDevlieghere requested review of this revision.Jun 22 2022, 1:45 PM
aprantl accepted this revision.Jun 22 2022, 1:54 PM

Oh boy, these are scary. Should LLDB fail harder when the utility expression fails, so we can detect these earlier?

This revision is now accepted and ready to land.Jun 22 2022, 1:54 PM

Oh boy, these are scary. Should LLDB fail harder when the utility expression fails, so we can detect these earlier?

Fortunately we print an error, but we're also pretty resilient against some of this information missing. This bug was particularly tricky because it only causes a problem the second time that you execute the utility function, which only occurs when you have lazily instantiated classes (in Swift) which is why we didn't see this on llvm.org

Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2022, 1:57 PM