[PATCH] D33513: [ThinLTO] Fix ThinLTO crash while destroying context

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 17:03:48 PDT 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D33513#764629, @ncharlie wrote:

> In https://reviews.llvm.org/D33513#763708, @davide wrote:
>
> > Thanks for your first contribution, great GSoC start!
>
>
> Thanks! This was a good chance to look closely at the code to start learning how it works.
>
> > One note: this manifests with ThinLTO, but it might be a more generic metadata issue. Are you able to reproduce without ThinLTO  (and maybe with a single file?)
>
> The bug only happens when lazy loading Metadata. Lazy loading occurs when module level metadata is being imported by ThinLTO (see https://reviews.llvm.org/diffusion/L/browse/llvm/trunk/lib/Bitcode/Reader/MetadataLoader.cpp;303885$781). I believe this is the only path that leads to lazy loading, so I don't think it can happen elsewhere.


If there is no other path to exercise LazyLoading of Metadata, let's just create one! (add an option to llvm-dis for example).


Repository:
  rL LLVM

https://reviews.llvm.org/D33513





More information about the llvm-commits mailing list