From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61A1B383803B; Mon, 26 Apr 2021 15:28:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61A1B383803B From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27773] 'Dump memory' command aborted in GDB Date: Mon, 26 Apr 2021 15:28:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 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: Mon, 26 Apr 2021 15:28:52 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27773 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Simon Marchi : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dbea3329b76cf= 131ad4ac27acb6728b38984998b9 commit bea3329b76cf131ad4ac27acb6728b38984998b9 Author: Simon Marchi Date: Mon Apr 26 11:27:07 2021 -0400 gdb: check result of gdb_fopen_cloexec in dump_binary_file Bug 27773 shows that passing a filename in a non-existent directory to the "dump binary" command leads to a gdb crash. This is because the gdb_fopen_cloexec in dump_binary_file fails (returns nullptr) and the return value is not checked. Fix that by erroring out if gdb_fopen_cloexec fails. gdb/ChangeLog: PR gdb/27773 * cli/cli-dump.c (dump_binary_file): Check result of gdb_fopen_cloexec. gdb/testsuite/ChangeLog: PR gdb/27773 * gdb.base/dump.exp: Test dump to non-existent dir. Change-Id: Iea89a3bf9e6b9dcc31142faa5ae17bc855759328 --=20 You are receiving this mail because: You are on the CC list for the bug.=