[llvm-bugs] [Bug 34325] New: Invalid reference to a DIType crashes the verifier

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 25 11:01:55 PDT 2017


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

            Bug ID: 34325
           Summary: Invalid reference to a DIType crashes the verifier
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: davide at freebsd.org
          Reporter: davide at freebsd.org
                CC: aprantl at apple.com, dblaikie at gmail.com,
                    llvm-bugs at lists.llvm.org, rnk at google.com

@bar = global i64 0, align 8, !dbg !0

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!8}

!0 = !DIGlobalVariableExpression(var: !1)
!1 = !DIGlobalVariable(name: "c", scope: null, isLocal: false, isDefinition:
true, type: !6)
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3,
isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, retainedTypes:
!4, globals: !7)
!3 = !DIFile(filename: "a", directory: "")
!4 = !{!5}
!5 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !6, file: !3,
identifier: "patatino")
!6 = distinct !DISubprogram(name: "b", scope: null, isLocal: false,
isDefinition: true, isOptimized: false, unit: !2)
!7 = !{!0}
!8 = !{i32 2, !"Debug Info Version", i32 3}

$ ./opt pet.ll  -S
invalid type ref
!1 = !DIGlobalVariable(name: "c", scope: null, type: !2, isLocal: false,
isDefinition: true)
!2 = distinct !DISubprogram(name: "b", scope: null, isLocal: false,
isDefinition: true, isOptimized: false, unit: !3)
opt: ../include/llvm/IR/DebugInfoMetadata.h:78:
llvm::TypedDINodeRef<T>::TypedDINodeRef(const llvm::Metadata*) [with T =
llvm::DIType]: Assertion `(!MD || isa<T>(MD)) && "Expected valid type ref"'
failed.

-- 
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/20170825/fc46f4a7/attachment.html>


More information about the llvm-bugs mailing list