The BinaryHolder has two caches for object and archive entries. These are implemented as StringMaps of ObjectEntry and ArchiveEntry respectively. The fact that they're stored by value is problematic because the BinaryHolder hands out references that become invalidate when the data structure grows. This patch wraps those object instances in unique pointers and changes the interface to hand out pointers. This resulted in transient failures
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/dsymutil/BinaryHolder.cpp | ||
---|---|---|
227–228 | I think we can end up with two distinct ObjectEntry's (at different addresses) for the same {filename, timestamp} key, because archive loading is racy. Is that ok? |
llvm/tools/dsymutil/BinaryHolder.cpp | ||
---|---|---|
227–228 | That's a good point. I guess there's no better way to avoid that than by locking the during the whole loading sequence. |
llvm/tools/dsymutil/BinaryHolder.cpp | ||
---|---|---|
227–228 | I can't think of a better option. |
llvm/tools/dsymutil/BinaryHolder.cpp | ||
---|---|---|
2 | ? |
llvm/tools/dsymutil/BinaryHolder.cpp | ||
---|---|---|
179 | This comment might be stale now. |
?