[PATCH] D42471: [ARM] Fix lld crash introduced by r321154
vit9696 via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 08:43:38 PST 2018
vit9696 added inline comments.
================
Comment at: ELF/Writer.cpp:1312
OutputSection *OS = SS->getParent();
- if (!SS->empty() || !OS)
+ if (!OS || !SS->empty())
continue;
----------------
ikudrin wrote:
> I think this change is independent. It's more about style, so it should be applied separately.
Here I have to disagree. This avoids a potentially insecure code, which has already caused a crash.
Since a check is put here, and not before getParent, it is obvious that there exists some connection, so it is safer to firstly check for null.
https://reviews.llvm.org/D42471
More information about the llvm-commits
mailing list