From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FF23385842B; Mon, 17 Apr 2023 16:09:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FF23385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681747778; bh=OnRCcokhLS0Mpc2fkc7H/RPcPMAB4VUlhobTfgkUSBo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CkM6oan2I875uaqXu8JIwe61S2zU1B9rcCI27pV9hUgBDMo0pvVa69C5CMxmLw23l vig4Ka8dibuBCBTtwts+HV8lG83jK6D0NzQ8V7jv9klisJk3AtyG5sJCQAYPImKh6k eQyQDdonEsTWCDE+R0N9VhH0Tb/T01duTQXmSsk0= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30357] Segmentation fault for the 'start' command Date: Mon, 17 Apr 2023 16:09:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: Message-ID: In-Reply-To: References: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30357 --- Comment #8 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfb12bc1e8e7c= 5246e4eabcebdb4644c43bc7e6b9 commit fb12bc1e8e7c5246e4eabcebdb4644c43bc7e6b9 Author: Tom de Vries Date: Mon Apr 17 18:09:32 2023 +0200 [gdb/symtab] Handle empty file name in .debug_line section With DWARF 5, it's possible to produce an empty file name in the File N= ame Table of the .debug_line section: ... The File Name Table (offset 0x112, lines 1, columns 2): Entry Dir Name 0 1 (indirect line string, offset: 0x2d): ... Currently, when gdb reads an exec containing such debug info, it segfau= lts: ... Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. 0x000000000072cd38 in dwarf2_start_subfile (cu=3D0x2badc50, fe=3D..., l= h=3D...) at \ gdb/dwarf2/read.c:18716 18716 if (!IS_ABSOLUTE_PATH (filename) && dirname !=3D NULL) ... because read_direct_string transforms "" into a nullptr, and we end up dereferencing the nullptr. Note that the behaviour of read_direct_string has been present since re= po creation. Fix this in read_formatted_entries, by transforming nullptr filenames i= n to "" filenames. Tested on x86_64-linux. Reviewed-By: Tom Tromey PR symtab/30357 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30357 --=20 You are receiving this mail because: You are on the CC list for the bug.=