[Lldb-commits] [lldb] [lldb][Formatters] Do not recursively dereference pointer type when creating formatter candicates list. (PR #124048)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 23 00:08:03 PST 2025


https://github.com/labath commented:

This makes sense to me, but I'd like to hear what @jimingham thinks about this.

> The current behaviour might cause crash on pretty printers. If the pretty printer calls SBValue::GetChildMemberWithName when compute the synthetic children or summary string and its type is T**, this might cause crash as it will return nullptr or None in this case

The code you linked to is problematic even with this fix. The returned value could be null due to bad/missing debug info or due to a new version of libstdc++ renaming the (private) member. That code should be using `GetChildAtNamePath`, which checks that all the intermediate nodes are present.

https://github.com/llvm/llvm-project/pull/124048


More information about the lldb-commits mailing list