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

Yichao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 11:29:31 PDT 2017


yuyichao added a comment.

> 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.

I didn't go through the review of https://reviews.llvm.org/D30724 but this is actually how I noticed the issue (non-NULL info being assigned to NULL section). I think the only thing that line can do, assuming the mapping and current section is properly maintained, is to assign NULL to the NULL section in the map (L686 without explicit initialization should be fine since unique_ptr is not a POD type) which seems harmless enough to me..... I'm assuming that this issue isn't related to the change here though?


https://reviews.llvm.org/D38588





More information about the llvm-commits mailing list