<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77440>77440</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLDB Fails to Render List Correctly Within Nested Type in Unordered Map
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JinjieZhao
</td>
</tr>
</table>
<pre>
## Environment:
OS: Ubuntu 22.04
Kernel: 5.15.0-91-generic
Clang Version: Ubuntu clang version 16.0.6
LLDB Version: 16.0.6
## Code:
```c++
#include <iostream>
#include <list>
#include <unordered_map>
class Node {
public:
std::list<size_t> history_;
};
int main() {
std::unordered_map<uint32_t , Node> node_store_{};
auto &node = node_store_[1];
node.history_.push_back(2);
std::cout << node.history_.size() << std::endl;
std::cout << node_store_.size() << std::endl;
}
```
## build
`clang++ -o foo foo.cpp -g -O0 -Wall -Wextra -Werror -fuse-ld=lld -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -fstandalone-debug -stdlib=libc++
`
## lldb output:
```
(lldb) p node
(std::unordered_map<unsigned int, Node, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<const unsigned int, Node> > >::mapped_type) $0 = {
history_ = size=1 {
[0] = 2
}
}
(lldb) p node_store_
(std::unordered_map<unsigned int, Node, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<const unsigned int, Node> > >) $1 = size=1 {
[0] = {
first = 1
second = {
history_ = size=0 {}
}
}
with error log
[GetCached] Looking into cache for type std::__1::list<unsigned long, std::__1::allocator<unsigned long> >
[GetCached] Cache search success. Returning.
Cache hits: 311 - Cache Misses: 91
[Get] Search failed. Giving language a chance.
[Get] Language search success. Returning.
[history_ 0x560d9e46fd00] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[ValueObjectSynthetic::UpdateValue] name=history_, synthetic filter said caches are stale - clearing
[ValueObjectSynthetic::UpdateValue] name=history_, synthetic filter said it will not provide a value
[history_ 0x560d9e46fd00] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[history_ 0x560d9d80fee0] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[history_ 0x560d9d80fee0] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[Debugger::FormatPrompt] dumping ordinary printable output
[history_ 0x560d9d80fee0] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[history_ 0x560d9d80fee0] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
[ValueObjectSynthetic::CalculateNumChildren] for VO of name history_ and type std::__1::list<unsigned long, std::__1::allocator<unsigned long> >, the filter returned 0 child values
[history_ 0x560d9d80fee0] checking for FormatManager revisions. ValueObject rev: 309 - Global rev: 309
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkV9tu2zgTfhr6ZiBBoiwfLnyR2EmB_0-bRbttgb0xRuJYYkuRWpJKmz79gpRP8SZob3YLdAFbtoZz-PjNgRI6JxtNtGLlNSs3Exx8a-zqf1J_kvRHi2ZSGfG4YrxgvIAb_SCt0R1pz4orlm1Ytr_ev2PFFbyvBu0H4DzNpqP8_2Q1qbBWpnmZZskyTxrSZGU9KqwV6gY-kHXS6DMfdZQ_jHLIZ2mWzkaLu7vN9bnB-dr-OqJdG0EXMNksGz8149fhc9CXulaDIGDFWhrnLWHHipvnlpV0_oWlQRsryJLYdtifdOK1VugcvDFBc76PC_1QKVkfMQI4L8JdcTVGWTv5jbYhHLTSeWMft6w4gJ5vTv_jVWoPHUrN-ILx5VmYo9cLgOtBal_wrQfG1xFbiKSNoG0IRtvg4iwMAA7eAOMzHfdRbJ4ol9c5K8-1w2J6AJ72g2u3FdafGV9wxpdnikeAtRl8YJIV6wvrwMRhY-P60Yi0UD_ibI_zh12FrT-tmmeKrBqkEhclFmt3LDBIDOxM_KZ130PSQHKfQfIRlYLkI331FsOvtcZCshscJUqwYq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