[llvm-bugs] [Bug 34672] New: Verifier accepts broken DIGlobalVariable
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 19 09:12:17 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34672
Bug ID: 34672
Summary: Verifier accepts broken DIGlobalVariable
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: aprantl at apple.com
CC: llvm-bugs at lists.llvm.org
The Verifier accepts the following IR because we only visit DIGlobalVariables
when they are listed in the DICompileUnit, and never from a
DIGlobalVariableExpression.
@global = common global i32 0, align 4, !dbg !2
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!5, !6}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer:
"adrian", emissionKind: FullDebug)
!1 = !DIFile(filename: "broken.c", directory: "/")
!2 = !DIGlobalVariableExpression(var: !3, expr: !DIExpression())
!3 = !DIGlobalVariable(name: "g", scope: !0, file: !1, line: 1, type: !1,
isLocal: false, isDefinition: true)
; ^^^^^^^^ ERROR
!5 = !{i32 2, !"Dwarf Version", i32 4}
!6 = !{i32 1, !"Debug Info Version", i32 3}
--
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/20170919/b8087b9b/attachment.html>
More information about the llvm-bugs
mailing list