From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0A623856266; Sat, 7 May 2022 11:49:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0A623856266 From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/29128] New: "internal-error: find_pc_sect_compunit_symtab: Assertion `result != nullptr' failed" while debugging asm program Date: Sat, 07 May 2022 11:49:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2022 11:49:13 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29128 Bug ID: 29128 Summary: "internal-error: find_pc_sect_compunit_symtab: Assertion `result !=3D nullptr' failed" while debugging asm program Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simark at simark dot ca Target Milestone: --- On Arch Linux: $ cat readfile.asm=20 global _start section .text _start: mov rax, 2 mov rdi, path xor rsi, rsi syscall mov rax, 60 xor rdi, rdi syscall section .data path: db "/etc/hosts", 0 $ nasm --version=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 NASM version 2.15.05 compiled on Sep 24 2020 $ nasm -f elf64 -F dwarf -g readfile.asm $ ld --version=20=20=20=20=20=20=20=20=20=20=20=20=20 GNU ld (GNU Binutils) 2.38 Copyright (C) 2022 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later versio= n. This program has absolutely no warranty. $ ld readfile.o -o readfile $ ~/build/binutils-gdb-one-target/gdb/gdb -nx -q -data-directory=3D/home/simark/build/binutils-gdb-one-target/gdb/data-direc= tory readfile -ex starti -batch This GDB supports auto-downloading debuginfo from the following URLs: Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbini= t. /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18490: internal-error: find_pc_sect_compunit_symtab: Assertion `result !=3D nullptr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. #0 internal_error (file=3D0x55555de1b5e0 "/home/simark/src/binutils-gdb/gdb/dwarf2/read.c", line=3D18490, fmt=3D0x55555de19060 "%s: Assertion `%s' failed.") at /home/simark/src/binutils-gdb/gdbsupport/errors.cc:51 #1 0x000055556050bf3c in cooked_index_functions::find_pc_sect_compunit_sym= tab (this=3D0x60200007f190, objfile=3D0x6130000057c0, msymbol=3D..., pc=3D0x401= 000, section=3D0x0, warn_if_readin=3D1) at /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18490 #2 0x0000555561933a80 in objfile::find_pc_sect_compunit_symtab (this=3D0x6130000057c0, msymbol=3D..., pc=3D0x401000, section=3D0x0, warn_i= f_readin=3D1) at /home/simark/src/binutils-gdb/gdb/symfile-debug.c:447 #3 0x0000555561a02ce5 in find_pc_sect_compunit_symtab (pc=3D0x401000, section=3D0x0) at /home/simark/src/binutils-gdb/gdb/symtab.c:3017 #4 0x000055555f965339 in blockvector_for_pc_sect (pc=3D0x401000, section= =3D0x0, pblock=3D0x7fffffffc0b0, cust=3D0x0) at /home/simark/src/binutils-gdb/gdb/block.c:195 #5 0x000055555f965711 in block_for_pc_sect (pc=3D0x401000, section=3D0x0) = at /home/simark/src/binutils-gdb/gdb/block.c:273 #6 0x000055555f9657d2 in block_for_pc (pc=3D0x401000) at /home/simark/src/binutils-gdb/gdb/block.c:285 #7 0x0000555560c1a046 in skip_inline_frames (thread=3D0x617000033700, stop_chain=3D0x0) at /home/simark/src/binutils-gdb/gdb/inline-frame.c:353 #8 0x0000555560b9678e in handle_signal_stop (ecs=3D0x7fffffffca10) at /home/simark/src/binutils-gdb/gdb/infrun.c:6327 #9 0x0000555560b90779 in handle_inferior_event (ecs=3D0x7fffffffca10) at /home/simark/src/binutils-gdb/gdb/infrun.c:5855 #10 0x0000555560b7c916 in fetch_inferior_event () at /home/simark/src/binutils-gdb/gdb/infrun.c:4221 #11 0x0000555560ac838e in inferior_event_handler (During symbol reading: bad file number in macro information (299) event_type=3DINF_REG_EVENT) at /home/simark/src/binutils-gdb/gdb/inf-loop.c= :41 #12 0x0000555560d9454f in handle_target_event (error=3D0, client_data=3D0x0= ) at /home/simark/src/binutils-gdb/gdb/linux-nat.c:4136 #13 0x000055556253bf6b in handle_file_event (file_ptr=3D0x607000014d10, ready_mask=3D1) at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:5= 74 #14 0x000055556253c8a6 in gdb_wait_for_event (block=3D0) at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:700 #15 0x000055556253a5e5 in gdb_do_one_event () at /home/simark/src/binutils-gdb/gdbsupport/event-loop.cc:212 #16 0x0000555561ca74b7 in wait_sync_command_done () at /home/simark/src/binutils-gdb/gdb/top.c:553 #17 0x0000555561ca76cf in maybe_wait_sync_command_done (was_sync=3D0) at /home/simark/src/binutils-gdb/gdb/top.c:570 #18 0x0000555561ca8ba3 in execute_command (p=3D0x7fffffffe1b3 "", from_tty= =3D0) at /home/simark/src/binutils-gdb/gdb/top.c:701 #19 0x0000555560e93d27 in catch_command_errors (command=3D0x555561ca76ec , arg=3D0x7fffffffe1ad "starti", from_tt= y=3D0, do_bp_actions=3Dtrue) at /home/simark/src/binutils-gdb/gdb/main.c:515 #20 0x0000555560e945c4 in execute_cmdargs (cmdarg_vec=3D0x7fffffffd730, file_type=3DCMDARG_FILE, cmd_type=3DCMDARG_COMMAND, ret=3D0x7fffffffd3f0) at /home/simark/src/binutils-gdb/gdb/main.c:610 #21 0x0000555560e987b6 in captured_main_1 (context=3D0x7fffffffdbd0) at /home/simark/src/binutils-gdb/gdb/main.c:1304 #22 0x0000555560e98dc2 in captured_main (data=3D0x7fffffffdbd0) at /home/simark/src/binutils-gdb/gdb/main.c:1325 #23 0x0000555560e98ea4 in gdb_main (args=3D0x7fffffffdbd0) at /home/simark/src/binutils-gdb/gdb/main.c:1350 #24 0x000055555f568a39 in main (argc=3D8, argv=3D0x7fffffffdd68) at /home/simark/src/binutils-gdb/gdb/gdb.c:32 --=20 You are receiving this mail because: You are on the CC list for the bug.=