[PATCH] D41474: Fix a crash in lazy loading of Metadata in ThinLTO

Sunil Srivastava via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 10:56:31 PST 2018


Sunil_Srivastava added a comment.

The thing that I do not understand is that, even though the error happens while reading EchoD2, a change in DeltaD2 avoid the error.

Specifically, removing the  getelementptr instr from DeltaD2 avoids the error, even though the error in the failing run occurs before reading DeltaD2.

Under debugger readers of  these two differing version follow widely different paths.

Are there any kind of internal documentation of notes describing what lazy loading is doing precisely?



================
Comment at: test/ThinLTO/X86/pr35472-a.ll:132
+!49 = !DILocation(line: 2, column: 58, scope: !34, inlinedAt: !42)
+!50 = !DILocation(line: 6, column: 8, scope: !36)
+
----------------
mehdi_amini wrote:
> Can you reduce the test case? And make it very clear *what* is the exact structure that lead to the issue?
> 
> See the kind of test here: llvm/trunk/test/ThinLTO/X86/lazyload_metadata.ll
> 
There is the smallest C++ test case that I could come up with, but I have not attempted to reduce the IR. I will try that.

The exact structure leading to the error is inlining of a normal (not nodebug) function inside a nodug function. That leads to an instruction with attached debuginfo inside an otherwise nodebug function.


https://reviews.llvm.org/D41474





More information about the llvm-commits mailing list