Skip to content

Fix nullptr deref and reenable test #3780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ class LLDBMemoryReader : public swift::remote::MemoryReader {
std::string &dest) override {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));

LLDB_LOGV(log, "[MemoryReader] asked to read string data at address {0x}",
LLDB_LOGV(log, "[MemoryReader] asked to read string data at address {0:x}",
address.getAddressData());

Target &target(m_process.GetTarget());
Expand Down
2 changes: 2 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3271,6 +3271,8 @@ class SwiftDWARFImporterDelegate : public swift::DWARFImporterDelegate {
for (size_t i = 0; i != images.GetSize(); ++i) {
auto module_sp = images.GetModuleAtIndex(i);
auto *swift_ast_ctx = GetModuleSwiftASTContext(*module_sp);
if (!swift_ast_ctx)
continue;
auto *dwarf_imp = static_cast<SwiftDWARFImporterDelegate *>(
swift_ast_ctx->GetDWARFImporterDelegate());
if (!dwarf_imp || dwarf_imp == this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def cleanup():
self.expect("e container.wrapped.value", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def cleanup():

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

Expand Down