swiftlang / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Swift’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.12k stars 332 forks source link

[lldb] Prevent a bunch of potential use-after-free with SwiftASTContext #9664

Open adrian-prantl opened 5 days ago

adrian-prantl commented 5 days ago

TypeSystemSwiftTypeRef::GetSwiftASTContext() may destroy and recreate any of the SwiftASTContexts in its map of contexts, so clients need to hold on to a shared pointer to avoid another thread destroying the context while it is in use.

rdar://71278998

adrian-prantl commented 5 days ago

@swift-ci test