[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb] Use objc_getRealizedClassList_trylock on macOS Ventura and laterIn order to avoid stranding the Objective-C runtime lock, we switchedfrom objc_copyRealizedClassList to its non locking varia
[lldb] Use objc_getRealizedClassList_trylock on macOS Ventura and laterIn order to avoid stranding the Objective-C runtime lock, we switchedfrom objc_copyRealizedClassList to its non locking variantobjc_copyRealizedClassList_nolock. Not taking the lock was relativelysafe because we run this expression on one thread only, but it was stillpossible that someone was in the middle of modifying this list while wewere trying to read it. Worst case that would result in a crash in theinferior without side-effects and we'd unwind and try again later.With the introduction of macOS Ventura, we can useobjc_getRealizedClassList_trylock instead. It has semantics similar toobjc_copyRealizedClassList_nolock, but instead of not locking at all,the function returns if the lock is already taken, which avoids theaforementioned crash without stranding the Objective-C runtime lock.Because LLDB gets to allocate the underlying memory we also avoidstranding the malloc lock.rdar://89373233Differential revision: https://reviews.llvm.org/D127252
[lldb] Add a test for user-defined objc_copyRealizedClassList_nolockLLDB evaluates some utility expression to update the Objective-C class list thatends up calling function such as `free` or `objc
[lldb] Add a test for user-defined objc_copyRealizedClassList_nolockLLDB evaluates some utility expression to update the Objective-C class list thatends up calling function such as `free` or `objc_copyRealizedClassList_nolock`.This adds a test that just tries to define our own bogus version of`objc_copyRealizedClassList_nolock`. It just tests that LLDB doesn't crash as wecurrently don't have a way to tell LLDB to look for the function in a specificlibrary.Reviewed By: JDevlieghereDifferential Revision: https://reviews.llvm.org/D107778