Skip to content

Commit d4e60e2

Browse files
committed
[lldb] Disable deserialization safety for lldb
Deserialization safety prevents reading internal implementation details from swiftmodules files. Let's disable it for LLDB as these details are useful for debugging and LLDB enables more deserialization recovery. The recovery should help handle the same issues avoided by the safety. We can also expand the recovery more liberally if it crashes under paths avoided under safety.
1 parent d01c8c2 commit d4e60e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,10 @@ SwiftASTContext::SwiftASTContext(std::string description,
944944
// for the protocol conforming types.
945945
lang_opts.AllowModuleWithCompilerErrors = true;
946946
lang_opts.EnableTargetOSChecking = false;
947+
948+
// Bypass deserialization safety to allow deserializing internal details from
949+
// swiftmodule files.
950+
lang_opts.EnableDeserializationSafety = false;
947951
}
948952

949953
SwiftASTContext::~SwiftASTContext() {

0 commit comments

Comments
 (0)