From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D2323858D35; Tue, 16 Nov 2021 16:18:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D2323858D35 From: "wcohen at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/103241] Odd 0 length entries in location lists Date: Tue, 16 Nov 2021 16:18:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 16:18:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103241 --- Comment #7 from Will Cohen --- Looking at the set_mem.s the second issue of the 0-length location entry for static_protections is coming from this bit of assembly in the set_memory.s: .byte 0x4 .uleb128 .LVL637-.LVL615 .uleb128 .LHOTE19-.LVL615 .uleb128 0x3 .byte 0x53 .byte 0x93 .uleb128 0x8 The attached .s and .i files were from a local compile of linux git repo co= mmit 8ab774587903771821b59471cc723bba6d893942. The part of the llvm-dwarf dump related should be looking for is [0x0000000000001b1b, 0x0000000000001b1b). llvm-dwarfdump -c --name=3D"static_protections" arch/x86/mm/pat/set_memory.o |more 0x00019218: DW_TAG_subprogram DW_AT_abstract_origin (0x00014236 "static_protections") DW_AT_ranges (0x00000bc0 [0x0000000000001990, 0x0000000000001b1b) [0x0000000000000000, 0x00000000000000bd)) DW_AT_frame_base (DW_OP_call_frame_cfa) DW_AT_call_all_calls (true) DW_AT_sibling (0x00019807) 0x00019228: DW_TAG_formal_parameter DW_AT_abstract_origin (0x00014248 "prot") DW_AT_location (0x00006f38:=20 [0x0000000000001990, 0x0000000000001990): DW_OP_reg5 RDI [0x0000000000001990, 0x00000000000019b9): DW_OP_reg5 RDI, DW_ OP_piece 0x8 [0x00000000000019f0, 0x0000000000001a43): DW_OP_reg5 RDI [0x0000000000001a67, 0x0000000000001aab): DW_OP_reg3 RBX [0x0000000000001ace, 0x0000000000001adc): DW_OP_reg5 RDI [0x0000000000001adc, 0x0000000000001af1): DW_OP_reg3 RBX, DW_ OP_piece 0x8 [0x0000000000001af1, 0x0000000000001af1): DW_OP_reg3 RBX, DW_ OP_piece 0x8 [0x0000000000001af1, 0x0000000000001b1b): DW_OP_reg3 RBX [0x0000000000001b1b, 0x0000000000001b1b): DW_OP_reg3 RBX, DW_ OP_piece 0x8 [0x0000000000000000, 0x000000000000002d): DW_OP_reg3 RBX, DW_ OP_piece 0x8 [0x000000000000004e, 0x000000000000007e): DW_OP_reg3 RBX [0x000000000000007e, 0x00000000000000bd): DW_OP_reg3 RBX, DW_ OP_piece 0x8) DW_AT_unknown_2137 (0x00006f20) 0x00019235: DW_TAG_formal_parameter DW_AT_abstract_origin (0x00014255 "start") DW_AT_location (0x00006fb1:=20 [0x0000000000001990, 0x00000000000019f0): DW_OP_reg4 RSI [0x00000000000019f0, 0x0000000000001aab): DW_OP_reg12 R12 [0x0000000000001aab, 0x0000000000001aba): DW_OP_entry_value(D W_OP_reg4 RSI), DW_OP_stack_value [0x0000000000001aba, 0x0000000000001adc): DW_OP_reg4 RSI [0x0000000000001adc, 0x0000000000001b1b): DW_OP_reg12 R12 [0x0000000000001b1b, 0x0000000000001b1b): DW_OP_reg4 RSI [0x0000000000000000, 0x0000000000000025): DW_OP_reg4 RSI [0x0000000000000025, 0x00000000000000bd): DW_OP_reg12 R1= 2) DW_AT_unknown_2137 (0x00006fa1) 0x00019242: DW_TAG_formal_parameter DW_AT_abstract_origin (0x00014262 "pfn") DW_AT_location (0x00007009:=20 [0x0000000000001990, 0x00000000000019f0): DW_OP_reg1 RDX [0x00000000000019f0, 0x0000000000001aab): DW_OP_reg15 R15 [0x0000000000001aab, 0x0000000000001aba): DW_OP_entry_value(D W_OP_reg1 RDX), DW_OP_stack_value [0x0000000000001aba, 0x0000000000001adc): DW_OP_reg1 RDX [0x0000000000001adc, 0x0000000000001b1b): DW_OP_reg15 R15 [0x0000000000001b1b, 0x0000000000001b1b): DW_OP_reg1 RDX [0x0000000000000000, 0x000000000000001c): DW_OP_reg1 RDX [0x000000000000001c, 0x00000000000000bd): DW_OP_reg15 R1= 5) DW_AT_unknown_2137 (0x00006ff9) 0x0001924f: DW_TAG_formal_parameter DW_AT_abstract_origin (0x0001426f "npg") DW_AT_location (0x00007061:=20 [0x0000000000001990, 0x00000000000019f0): DW_OP_reg2 RCX [0x00000000000019f0, 0x0000000000001aab): DW_OP_reg13 R13 [0x0000000000001aab, 0x0000000000001aba): DW_OP_entry_value(D W_OP_reg2 RCX), DW_OP_stack_value [0x0000000000001aba, 0x0000000000001adc): DW_OP_reg2 RCX [0x0000000000001adc, 0x0000000000001b1b): DW_OP_reg13 R13 [0x0000000000001b1b, 0x0000000000001b1b): DW_OP_reg2 RCX [0x0000000000000000, 0x0000000000000010): DW_OP_reg2 RCX [0x0000000000000010, 0x00000000000000bd): DW_OP_reg13 R1= 3) DW_AT_unknown_2137 (0x00007051) 0x0001925c: DW_TAG_formal_parameter DW_AT_abstract_origin (0x0001427c "lpsize") DW_AT_location (0x000070b3:=20 [0x0000000000001990, 0x00000000000019d5): DW_OP_reg8 R8 [0x00000000000019d5, 0x0000000000001aab): DW_OP_reg14 R14 [0x0000000000001aab, 0x0000000000001aba): DW_OP_entry_value(D W_OP_reg8 R8), DW_OP_stack_value [0x0000000000001aba, 0x0000000000001b1b): DW_OP_reg14 R14 [0x0000000000000000, 0x00000000000000bd): DW_OP_reg14 R1= 4) DW_AT_unknown_2137 (0x000070a9) 0x00019269: DW_TAG_formal_parameter DW_AT_abstract_origin (0x00014289 "warnlvl") DW_AT_location (0x000070f4:=20 [0x0000000000001990, 0x00000000000019f0): DW_OP_reg9 R9 [0x00000000000019f0, 0x0000000000001aba): DW_OP_fbreg -72 [0x0000000000001aba, 0x0000000000001adc): DW_OP_reg9 R9 [0x0000000000001adc, 0x0000000000001b1b): DW_OP_fbreg -72 [0x0000000000001b1b, 0x0000000000001b1b): DW_OP_reg9 R9 [0x0000000000000000, 0x000000000000000d): DW_OP_reg9 R9 [0x000000000000000d, 0x00000000000000bd): DW_OP_fbreg -7= 2) DW_AT_unknown_2137 (0x000070e6)=