[PATCH] D69452: [ThinLTO/WPD] Fix index-based WPD for available_externally vtables
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 18:05:57 PST 2019
tejohnson marked an inline comment as done.
tejohnson added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:874
continue;
for (auto VTP : VS->vTableFuncs()) {
if (VTP.VTableOffset != P.AddressPointOffset + ByteOffset)
----------------
tejohnson wrote:
> aganea wrote:
> > Hi Theresa!
> > I'm getting a crash when building Clang with ThinLTO.
> > The issue seems that `VS` ends up pointing an `AliasSummary *` instead of a `GlobalVarSummary *`, because of the `!GlobalValue::isAvailableExternallyLinkage()` test above, which leads to a crash when dereferencing the first element of `VS->vTableFuncs().begin()`, because it doesn't point to the right thing.
> > I'm at checkout 1cc0ba4 (from yesterday)
> > Please see the full repro: {F10964861}
> Thanks for the report and repro. I will take a look today. Conceptually it seems like a simple fix of invoking getBaseObject() on the summary is needed at some point in this loop.
Fix sent for review in D71040.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69452/new/
https://reviews.llvm.org/D69452
More information about the llvm-commits
mailing list