Skip to content

Commit 2b846a4

Browse files
authored
[lldb] Handle unsupported type in GetPointerType (#4954) (#4975)
For `TypeSystemSwiftTypeRef::GetPointerType` to succeed, the given type variable first must be demangled. If that fails, the function must return an empty `CompilerType`. This fixes downstream crashes [in `GetPointerTo` where `Node::addChild` is called](https://github.com/apple/llvm-project/blob/1d75a24ee862516c100d6a540c566349a79c3522/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp#L269), but with a null node. This causes an [abort in `addChild`](https://github.com/apple/swift/blob/380e370157655a102e6cf1abd46b74d575f2ecce/lib/Demangling/Demangler.cpp#L345), where the child node is required to be non-null. rdar://96170947 (cherry-picked from commit 21d1b51)
1 parent 97922fa commit 2b846a4

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)