Skip to content

Instantly share code, notes, and snippets.

@jmorse
Last active December 14, 2023 11:30
Show Gist options
  • Save jmorse/b0248c3c9f9195487ffd7c7431a8d15e to your computer and use it in GitHub Desktop.
Save jmorse/b0248c3c9f9195487ffd7c7431a8d15e to your computer and use it in GitHub Desktop.
LLVM Crash reproducer for D144006
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-unknown"
define void @shoes() !dbg !32 {
entry:
ret void, !dbg !41
}
!llvm.dbg.cu = !{!0, !29}
!llvm.module.flags = !{!31}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_17, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)
!1 = !DIFile(filename: "module2", directory: ".")
!2 = !{}
!3 = !{!4, !16, !21, !23}
!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression(DW_OP_constu, 0, DW_OP_stack_value))
!5 = distinct !DIGlobalVariable(name: "bar", scope: !0, file: !6, line: 12, type: !7, isLocal: true, isDefinition: true)
!6 = !DIFile(filename: "a", directory: "")
!7 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)
!8 = distinct !DICompositeType(tag: DW_TAG_enumeration_type, name: "enumname", file: !9, line: 15, baseType: !10, size: 32, flags: DIFlagEnumClass, elements: !2, identifier: "name")
!9 = !DIFile(filename: "b", directory: "")
!10 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32", file: !11, line: 1008, baseType: !12)
!11 = !DIFile(filename: "c", directory: "")
!12 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32", scope: !14, file: !13, line: 43, baseType: !15)
!13 = !DIFile(filename: "d", directory: "")
!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "types", file: !13, line: 32, size: 8, flags: DIFlagTypePassByValue, elements: !2, identifier: "types")
!15 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!16 = !DIGlobalVariableExpression(var: !17, expr: !DIExpression(DW_OP_constu, 536870912, DW_OP_stack_value))
!17 = distinct !DIGlobalVariable(name: "baz", scope: !0, file: !18, line: 542, type: !19, isLocal: true, isDefinition: true)
!18 = !DIFile(filename: "e", directory: "")
!19 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !20)
!20 = distinct !DICompositeType(tag: DW_TAG_enumeration_type, name: "qux", file: !18, line: 487, baseType: !15, size: 32, elements: !2, identifier: "qux")
!21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression(DW_OP_constu, 1073741824, DW_OP_stack_value))
!22 = distinct !DIGlobalVariable(name: "quux", scope: !0, file: !18, line: 543, type: !19, isLocal: true, isDefinition: true)
!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression(DW_OP_constu, 0, DW_OP_stack_value))
!24 = distinct !DIGlobalVariable(name: "croft", scope: !0, file: !25, line: 55, type: !26, isLocal: true, isDefinition: true)
!25 = !DIFile(filename: "f", directory: "")
!26 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !27)
!27 = distinct !DICompositeType(tag: DW_TAG_enumeration_type, name: "type1", file: !28, line: 82, baseType: !15, size: 32, elements: !2, identifier: "type1")
!28 = !DIFile(filename: "g", directory: "")
!29 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_17, file: !30, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)
!30 = !DIFile(filename: "h", directory: ".")
!31 = !{i32 2, !"Debug Info Version", i32 3}
!32 = distinct !DISubprogram(name: "shoes", linkageName: "shoes", scope: !34, file: !33, line: 18, type: !38, scopeLine: 19, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !40, retainedNodes: !2)
!33 = !DIFile(filename: "xyzzy", directory: "")
!34 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "type2", file: !35, line: 10, size: 2176, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !36)
!35 = !DIFile(filename: "i", directory: "")
!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "type3", file: !37, line: 26, size: 128, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !36, identifier: "type3")
!37 = !DIFile(filename: "j", directory: "")
!38 = distinct !DISubroutineType(types: !39)
!39 = !{null}
!40 = !DISubprogram(name: "shoes", linkageName: "shoes", scope: !34, file: !35, line: 23, type: !38, scopeLine: 23, containingType: !34, virtualIndex: 11, flags: DIFlagProtected | DIFlagPrototyped, spFlags: DISPFlagVirtual | DISPFlagOptimized)
!41 = !DILocation(line: 691, scope: !42, inlinedAt: !56)
!42 = !DILexicalBlockFile(scope: !44, file: !43, discriminator: 2)
!43 = !DIFile(filename: "k", directory: "")
!44 = distinct !DILexicalBlock(scope: !45, file: !43, line: 691)
!45 = distinct !DILexicalBlock(scope: !46, file: !43, line: 691)
!46 = distinct !DILexicalBlock(scope: !47, file: !43, line: 691)
!47 = distinct !DILexicalBlock(scope: !48, file: !43, line: 690)
!48 = distinct !DILexicalBlock(scope: !49, file: !43, line: 689)
!49 = distinct !DISubprogram(name: "crumpets", linkageName: "crumpets", scope: !50, file: !43, line: 684, type: !51, scopeLine: 685, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !29, declaration: !52, retainedNodes: !53)
!50 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "type3", file: !43, line: 310, size: 128, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, templateParams: !2, identifier: "type3")
!51 = distinct !DISubroutineType(types: !39)
!52 = !DISubprogram(name: "crumpets", linkageName: "crumpets", scope: !50, file: !43, line: 684, type: !51, scopeLine: 684, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
!53 = !{!54}
!54 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !55, file: !43, line: 691, size: 128, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !2, identifier: "type4")
!55 = distinct !DISubprogram(name: "plimsoles", linkageName: "plimsoles", scope: !50, file: !43, line: 684, type: !51, scopeLine: 685, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !52, retainedNodes: !2)
!56 = distinct !DILocation(line: 759, scope: !57, inlinedAt: !60)
!57 = distinct !DISubprogram(name: "trainers", linkageName: "trainers", scope: !50, file: !43, line: 757, type: !58, scopeLine: 758, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !29, declaration: !59, retainedNodes: !2)!58 = distinct !DISubroutineType(types: !2)
!59 = !DISubprogram(name: "trainers", linkageName: "trainers", scope: !50, file: !43, line: 757, type: !58, scopeLine: 757, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
!60 = distinct !DILocation(line: 49, scope: !61, inlinedAt: !71)
!61 = distinct !DILexicalBlock(scope: !63, file: !62, line: 47)
!62 = !DIFile(filename: "l", directory: "")
!63 = distinct !DILexicalBlock(scope: !64, file: !62, line: 46)
!64 = distinct !DISubprogram(name: "platform", linkageName: "platform", scope: !65, file: !62, line: 44, type: !69, scopeLine: 45, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !29, declaration: !70, retainedNodes: !2)
!65 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "type5", file: !66, line: 14, size: 1728, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !67)
!66 = !DIFile(filename: "m", directory: "")
!67 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "type6", file: !68, line: 51, size: 640, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !67, identifier: "type6")
!68 = !DIFile(filename: "n", directory: "")
!69 = distinct !DISubroutineType(types: !2)
!70 = !DISubprogram(name: "platform", linkageName: "platform", scope: !65, file: !66, line: 78, type: !69, scopeLine: 78, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
!71 = distinct !DILocation(line: 23, scope: !32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment