[PATCH] D38588: Clear LastMappingSymbols and LastEMS(Info) when resetting the ARM(AArch64)ELFStreamer

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 10:59:32 PDT 2017


peter.smith added a comment.

On the assumption that the Sections encountered after the streamer has been reset are completely new, i.e. we don't want to go back to the previous Streamer's Sections, I think that clearing out the last mapping symbol state on reset() is definitely the right thing to do even if https://reviews.llvm.org/D30724  can be fixed to avoid a crash. For example we want to avoid false matches in LastMappingSymbols.

One thing I'm a bit puzzled about in https://reviews.llvm.org/D30724 is that line 467 (in review) looks like it will move a LastEMSInfo unique_ptr<ElfMappingSymbolInfo> that points to nullptr on first call as the class member on line 686 isn't initialized. This may or may not be important and I may have missed something in the code.


https://reviews.llvm.org/D38588





More information about the llvm-commits mailing list