Check case when _M_t child member is not present.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Did you investigate when does this happen? I take it it can happen if a user has a custom std::unique_ptr definition that kinda looks like the libstdc++ one, but not really, but I am wondering if we're not missing something else here..
This happened with MSVC's std::unique_ptr implementation. But I stepped through whole std::make_unique, and this was the only place, where lldb crashed.
Aha I see.
I think the root cause here is that this data formatter even gets invoked for MSVC's std::unique_ptr. Unfortunately, it seems that won't be able to differentiate easily, as the libstdc++ unique_ptr comes out simply as std::unique_ptr, without any tell-tale signs like __1 namespace that libc++ data types tend to have. If we ever get to implement unique_ptr formatter for MSVC type, we will probably have to have a single class that supports both. But this should be good enough for now.