From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GSiXMvhWnGmXMQcAWB0awg (envelope-from ) for ; Mon, 23 Feb 2026 08:32:40 -0500 Received: by simark.ca (Postfix, from userid 112) id CA78D1E089; Mon, 23 Feb 2026 08:32:40 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CFF561E089 for ; Mon, 23 Feb 2026 08:32:39 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 1387F4B9DB56 for ; Mon, 23 Feb 2026 13:32:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1387F4B9DB56 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 168C84BA23CF for ; Mon, 23 Feb 2026 13:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 168C84BA23CF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 168C84BA23CF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771853532; cv=none; b=AJ+nr5l4Y3fG+D+F9j9PGb6YuTP36xmBgBv9w2TGcmw16RB/eO5glhEb0kIuLgOsAcMX64fqeswdmXEKd9oqBcubvwmNpsaJqqxZIy5OHJ8E4UPC81XKwkiJw74Rx2t1EJfush4rSzl38s5LC4Z3evR6w8rOPgnefQbCG85eWos= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771853532; c=relaxed/simple; bh=mVYQMutQkkrHbr1m2osrw/eu/JGvEVubHOiYZXU8gVY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AdeQJmdo+wJfJa5H5F7eGQGPYF6iq7/W3uudZvitPmqNUTshSpI5E20wC2R+lJdiZz0nKmIskhn8idbPmv2oRxCMhxJ5h/whnQymg5aEha4KuV8S/xaAJNTkH6y9AE/Yk+rGRFKhds03WTQA2bv2luEF9OPFSz6FtyVN1iPS1M0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 168C84BA23CF Received: from mop.sam.mop (2.8.3.0.0.0.0.0.0.0.0.0.0.0.0.0.a.5.c.d.c.d.9.1.0.b.8.0.1.0.0.2.ip6.arpa [IPv6:2001:8b0:19dc:dc5a::382]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sam) by smtp.gentoo.org (Postfix) with ESMTPSA id A26A434360C; Mon, 23 Feb 2026 13:32:10 +0000 (UTC) From: Sam James To: Tom Tromey Cc: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [PATCH v3 0/8] Correctly handle inline functions with dwz In-Reply-To: <87ldgjmvtv.fsf@gentoo.org> Organization: Gentoo References: <20260220-dw-inline-fixup-pr-symtab-30728-2-v3-0-98ae8ab28fab@tromey.com> <87ldgjmvtv.fsf@gentoo.org> User-Agent: mu4e 1.12.15; emacs 31.0.50 Date: Mon, 23 Feb 2026 13:32:07 +0000 Message-ID: <87cy1vmvqg.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain Sam James writes: > Tom Tromey writes: > >> The new indexer does not correctly handle inline functions when 'dwz' >> is used to compress the DWARF. This series fixes the bug, cleaning up >> a number of other things on the way. >> >> I've separately regression tested each patch in this series on x86-64 >> Fedora 41. I've also regression tested the series as a whole with the >> dwz, gdb-index, and debug-names boards. >> >> Even with that I messed up somehow, so v1 didn't actually fix the bug >> in question. I must have modified the patches after testing..? >> >> Anyway in v2 I've moved the line recording the CU inclusion and added >> a comment explaining the placement. I re-ran the aformentioned tests >> and didn't touch anything. > > With this, I get a crash when creating an index: > ``` > $ /usr/bin/gdb --batch -nx -iex set\ auto-load\ no -iex set\ debuginfod\ > enabled\ off -ex file\ > \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin/gdb\' -ex save\ > gdb-index\ -dwarf-5\ > \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin\' > dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > ----- Backtrace ----- > 0x561db97db67e ??? > 0x561db9fd8a04 ??? > 0x561dba59b487 ??? > 0x561db9918fe0 ??? > 0x561db991fb47 ??? > 0x561db9927e99 ??? > 0x561db99282e0 ??? > 0x561db9f12f56 ??? > 0x561db9b6612c ??? > 0x561db9b6cbfb ??? > 0x561db9644baf ??? > 0x7f8b51c03649 ??? > 0x7f8b51c03765 ??? > 0x561db96648d0 ??? > 0xffffffffffffffff ??? > --------------------- > dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) [answered Y; input not from terminal] > > This is a bug, please report it. For instructions, see: > . > > dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Create a core file of GDB? (y or n) [answered Y; input not from > terminal] > ``` Core was generated by `/usr/bin/gdb -nx -iex set\ auto-load\ no -iex set\ debuginfod\ enabled\ off -ex file\ \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin/gdb\' -ex save\ gdb-index\ -dwarf-5\ \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin\''. Program terminated with signal SIGABRT, Aborted. Downloading 4.48 K source file /usr/src/debug/sys-libs/glibc-2.43.9999/glibc-2.43.9999/nptl/pthread_kill.c #0 __pthread_kill_implementation (threadid=, signo=6, no_tid=0) at pthread_kill.c:44 44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; [Current thread is 1 (Thread 0x7f1321442280 (LWP 385388))] (gdb) bt #0 __pthread_kill_implementation (threadid=, signo=6, no_tid=0) at pthread_kill.c:44 #1 __pthread_kill_internal (threadid=, signo=6) at pthread_kill.c:89 #2 __GI___pthread_kill (threadid=, signo=signo@entry=6) at pthread_kill.c:100 #3 0x00007f1321220442 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4 0x00007f13212013e9 in __GI_abort () at abort.c:77 #5 0x000055f113294bad in dump_core () at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:224 #6 0x000055f11329dbe5 in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_list_tag __va_list_tag *) (problem=, file=, line=, fmt=0x55f1139e8c6c "%s: Assertion `%s' failed.", ap=) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:476 #7 0x000055f113860488 in internal_verror (file=, line=, fmt=, ap=0x7ffc562e60c0) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:502 #8 internal_error_loc (file=, line=, fmt=) at ../gdbsupport/errors.cc:57 #9 0x000055f112bddfe1 in debug_names::build (this=) at dwarf2/index-write.c:818 #10 0x000055f112be4b48 in write_debug_names (per_bfd=per_bfd@entry=0x55f132cea0e0, table=table@entry=0x55f132cf6e40, out_file=0x55f132764db0, out_file_str=0x55f132ccf7a0) at dwarf2/index-write.c:1529 #11 0x000055f112bece9a in write_dwarf_index (per_bfd=0x55f132cea0e0, dir=0x55f1328a9110 "/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin", basename=0x55f1329512c2 "gdb", dwz_basename=0x0, index_kind=index_kind@entry=dw_index_kind::DEBUG_NAMES) at dwarf2/index-write.c:1696 #12 0x000055f112bed2e1 in save_gdb_index_command (args=, from_tty=) at dwarf2/index-write.c:1794 #13 0x000055f1131d7f57 in cmd_func (cmd=0x55f13264a020, args=, from_tty=1) at cli/cli-decode.c:2811 #14 execute_command (p=, from_tty=) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/top.c:632 #15 0x000055f112e2b12d in catch_command_errors (command=, arg=, from_tty=, do_bp_actions=true) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:507 #16 execute_cmdargs (cmdarg_vec=cmdarg_vec@entry=0x7ffc562e6c30, file_type=file_type@entry=CMDARG_FILE, cmd_type=cmd_type@entry=CMDARG_COMMAND, ret=ret@entry=0x7ffc562e6c14) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:606 #17 0x000055f112e31bfc in captured_main_1(captured_main_args*) [clone .constprop.0] (context=context@entry=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1342 #18 0x000055f112909bb0 in captured_main (context=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1365 #19 gdb_main (args=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1394 #20 main (argc=10, argv=0x7ffc562e7058) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/gdb.c:38 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmmcVtcbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkOlQ AQCRL9KYTMvvw+eAtMlG1YhqQqKuTPKC2/LoEGPkLbKwhgD9FQuTNt37OshnIS0y Av4vbRErdeiuxnIMCp7lm5Uywg0= =0lA2 -----END PGP SIGNATURE----- --=-=-=--