[llvm-dev] lld/lto/win32 crash on DIE code

Carlo Kok via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 21 02:31:00 PDT 2018



Op 21-3-2018 om 10:28 schreef Evgeny Leviant:
> It looks the problem lies in how your compiler generates debug info. LLVM doesn't
> expect DIDerivedType scope to be an instance of DICompileUnit. Here is a quick fix:
> 
>   DIE *DwarfUnit::getOrCreateContextDIE(const DIScope *Context) {
> -  if (!Context || isa<DIFile>(Context))
> +  if (!Context || isa<DIFile>(Context) || isa<DICompileUnit>(Context))
> 
> However, I suggest talking to someone with in-depth debug info experience, as the problem
> itself seems to be not related to LTO.

The problem seems to be related to that but it *does* support some 
DICompileUnits, just not this particular one, I stepped through this 
code and it gets a DICompileUnit often enough. Somehow during 
LTO/merging I get a type that has a different DICompileUnit than where 
the variable is defined, and it's not liking it.


More information about the llvm-dev mailing list