[PATCH] D79512: [DebugInfo][CodeView] Fix lowering of UDT
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 11:57:49 PDT 2020
aganea abandoned this revision.
aganea marked 2 inline comments as done.
aganea added a comment.
I've merged this back with D79447 <https://reviews.llvm.org/D79447>, I think it's better if it landed in one piece.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:2995
OS.AddComment("Type");
OS.emitInt32(getCompleteTypeIndex(T).getIndex());
emitNullTerminatedSymbolName(OS, UDT.first);
----------------
rnk wrote:
> It seems like there is still the possibility that getting the complete type index triggers some more type lowering which finds a new UDT, invalidating the iterators. I think it's a bug if this call ever triggers additional type lowering, because that could discover new UDTs (typedefs). I think that's impossible after your change: if all calls to addToUDTs are inside type lowering scopes, this should not happen.
>
> To make this bug easier to find in the future (i.e. not require asan), could you please add an assertion that the size of the UDTs vector doesn't change during iteration? It will probably require changing the parameter type from ArrayRef to SmallVectorImpl, but otherwise it should be a minor change.
Please see D79447.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79512/new/
https://reviews.llvm.org/D79512
More information about the llvm-commits
mailing list