Thanks to Andrey Guskov for his help investigating this!
Diff Detail
Event Timeline
tools/llvm-readobj/COFFDumper.cpp | ||
---|---|---|
622 | Done! Interesting, I kinda think I should actually use DictScope in a few other places of printCodeViewSymbolsSubsection()... | |
649 | Oh, good point! I've actually went one step further and added an extra Size sanity check. |
As a rule of thumb: Use DictScope for key-value pairs. Usually there's only a fixed amount of these per scope, like a single symbol info. Use ListScope if you want to delimit a list of things. Usually there's a loop printing the contents, and the amount is not fixed, like a list of symbols or sections. HTH!
You don't have a check to ensure that we can succeed in this getU16 call.