Skip to content

Commit 962fe56

Browse files
Merge pull request #3780 from adrian-prantl/null-swiftastcontext56
Fix nullptr deref and reenable test
2 parents 8717a3e + 17ce99b commit 962fe56

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,6 +3271,8 @@ class SwiftDWARFImporterDelegate : public swift::DWARFImporterDelegate {
32713271
for (size_t i = 0; i != images.GetSize(); ++i) {
32723272
auto module_sp = images.GetModuleAtIndex(i);
32733273
auto *swift_ast_ctx = GetModuleSwiftASTContext(*module_sp);
3274+
if (!swift_ast_ctx)
3275+
continue;
32743276
auto *dwarf_imp = static_cast<SwiftDWARFImporterDelegate *>(
32753277
swift_ast_ctx->GetDWARFImporterDelegate());
32763278
if (!dwarf_imp || dwarf_imp == this)

lldb/test/API/lang/swift/implementation_only_imports/library_indirect/TestLibraryIndirect.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def cleanup():
7878
self.expect("e container.wrapped.value", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])
7979

8080
@swiftTest
81-
@skipIfLinux # The "e container" command crashes in a non-reproducible way on the Linux bots.
8281
def test_implementation_only_import_library_no_library_module(self):
8382
"""Test `@_implementationOnly import` behind some indirection in a library used by the main executable, after removing the implementation-only library's swiftmodule
8483

lldb/test/API/lang/swift/implementation_only_imports/library_resilient/TestLibraryResilient.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def cleanup():
6565

6666
@swiftTest
6767
@expectedFailureAll(oslist=["windows"]) # Requires Remote Mirrors support
68-
@skipIfLinux # The "e container" command crashes in a non-reproducible way on the Linux bots.
6968
def test_implementation_only_import_library_no_library_module(self):
7069
"""Test `@_implementationOnly import` in a resilient library used by the main executable, after removing the implementation-only library's swiftmodule
7170

0 commit comments

Comments
 (0)