Skip to content

Conversation

@Michael137
Copy link

We've been hitting cases where LLDB marks a decl as isCompleteDefinition but no definition was allocated for it. Then when we access a an API in which Clang assumes a definition exists, and dereferences a nullptr. In the specific case that happens when we've incorrectly been keeping track of the ImportedDecls in clang::ASTImporter (which manifests as trying to MapImported on two different destination decls from the same source decl for the same ClangASTImporterDelegate).

The more fundmental issue is that we're failing to complete the type properly. But the fix for that is still in-progress. So we're working around the crash by guarding against failed type completion.

rdar://133958782

We've been hitting cases where LLDB marks a decl as
`isCompleteDefinition` but no definition was allocated
for it. Then when we access a an API in which Clang
assumes a definition exists, and dereferences a nullptr.
In the specific case that happens when we've incorrectly
been keeping track of the `ImportedDecls` in `clang::ASTImporter`
(which manifests as trying to `MapImported` on two different
destination decls from the same source decl for the same
ClangASTImporterDelegate).

The more fundmental issue is that we're failing to complete
the type properly. But the fix for that is still in-progress.
So we're working around the crash by guarding against failed
type completion.

rdar://133958782
@Michael137
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 5171d80 into swift/release/6.0 Sep 9, 2024
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