Skip to content

Conversation

@adrian-prantl
Copy link
Contributor

@adrian-prantl adrian-prantl commented Dec 20, 2025

We got LLDB crash logs where importer is dereferenced. In the same crash log the parent frame correctly checks for nullptr, so this would fix the immediate crash. In LLDB it is not guaranteed that a ClangImporter is installed at all times.

rdar://166224928
(cherry picked from commit 9f59903)

@adrian-prantl adrian-prantl requested a review from a team as a code owner December 20, 2025 00:58
We got LLDB crash logs where `importer` is dereferenced. In the same crash log
the parent frame correctly checks for nullptr, so this would fix the immediate
crash. In LLDB it is not guaranteed that a ClangImporter is installed at all
times.
Ideally this function should be converted to return `llvm::Expected<ModuleDecl &>`.

rdar://166224928
(cherry picked from commit bacb121)
@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@slavapestov
Copy link
Contributor

Also is there a test case for this on the lldb side? How did it avoid triggering the assertion before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants