[llvm-bugs] [Bug 38924] New: SalvageDebugInfo crash when using -debug (in bitTrackingDCE)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 13 02:49:21 PDT 2018


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

            Bug ID: 38924
           Summary: SalvageDebugInfo crash when using -debug (in
                    bitTrackingDCE)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: david.stenberg at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20873
  --> https://bugs.llvm.org/attachment.cgi?id=20873&action=edit
IR reproducer.

Reproduced on trunk (rL342000).

When running the following opt command on the attached IR reproducer:

    opt -bdce -o /dev/null bdce.ll -debug

you get a crash due to using isa<> on a null pointer when printing the debug
value:

    Args: opt -bdce -o /dev/null bdce.ll -debug
        discovered a new reachable node %entry
        discovered a new reachable node %entry
        discovered a new reachable node %entry
    DemandedBits: Root:   call void @llvm.dbg.value(metadata i32 %or248,
metadata !6, metadata !DIExpression()), !dbg !8
    DemandedBits: Root:   ret void
    SALVAGE:   call void @llvm.dbg.value(metadata i32 123, metadata opt:
../include/llvm/Support/Casting.h:92: static bool
llvm::isa_impl_cl<llvm::Function, llvm::Value *>::doit(const From *) [To =
llvm::Function, From = llvm::Value *]: Assertion `Val && "isa<> used on a null
pointer"' failed.
    Stack dump:
    0.  Program arguments: opt -bdce -o /dev/null bdce.ll -debug
    1.  Running pass 'Function Pass Manager' on module 'bdce.ll'.
    2.  Running pass 'Bit-Tracking Dead Code Elimination' on function '@bar'

-- 
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/20180913/1c7d4071/attachment.html>


More information about the llvm-bugs mailing list