[llvm-bugs] [Bug 47287] New: codeview assertion fails on lowerBound

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 22 10:37:11 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47287

            Bug ID: 47287
           Summary: codeview assertion fails on lowerBound
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: jistone at redhat.com
                CC: llvm-bugs at lists.llvm.org
            Blocks: 46725

Created attachment 23885
  --> https://bugs.llvm.org/attachment.cgi?id=23885&action=edit
IR for the unboxed-closures-unique-type-id.rs test

We encountered this assertion in Rust x86_64-msvc trying to upgrade to LLVM 11.
https://github.com/rust-lang/rust/pull/73526#issuecomment-678576555

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
1595   │     assert(!Subrange->getRawLowerBound() &&
1596   │            "codeview doesn't support subranges with lower bounds");


The IR for that failed test is attached. It contains this:

    !157 = !DISubrange(count: 3, lowerBound: 0)

The actual assertion was changed in D80197, specifically here:
https://github.com/llvm/llvm-project/commit/d20bf5a7258d4b6a7f017a81b125275dac1aa166#diff-8412e58a7e99d6349b9f9418af573792

I confirmed that our IR passes the assertion before that commit, when it
checked "Subrange->getLowerBound() == 0". I think that
"!Subrange->getRawLowerBound()" is not equivalent though because that raw
return value is a "Metadata *", so the assertion is now checking that it's
NULL. This is different than having the lowerBound present with a constant
value 0.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=46725
[Bug 46725] [meta] 11.0.0 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200822/7dfb44a2/attachment.html>


More information about the llvm-bugs mailing list