From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 195DD38432CD; Fri, 18 Aug 2023 19:07:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 195DD38432CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692385647; bh=mP/1q9m7LnMp6GiL036X5PxbS3KjFrdoMPXPVdtTnhg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=crwP26GKDNZ53m3CI3czu/9fpQrIr0cU3v2sMa9SQCvftchieFD0ZZadzENuWCXb2 ai4h/xf9bz7lFCfDCzGxgHJb0/EJkvDFCnO4MZsW2QsjinmLvfM3jAiWyyv6ArAzST iCqcWAqWh8i+8lbMObi0PnSMSjYh98lE3WEQFLQE= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/30780] gdb: -Werror=stringop-overflow build failure Date: Fri, 18 Aug 2023 19:07:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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=3D30780 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D28bb48114db4= de4ba0a72940af1c30728b6e82f2 commit 28bb48114db4de4ba0a72940af1c30728b6e82f2 Author: Tom Tromey Date: Fri Aug 18 07:55:30 2023 -0600 Fix off-by-one in call to vector::reserve While looking at a bug, I noticed what I think is an off-by-one mistake in a call to vector::reserve. This code: new_args.reserve (args.size ()); new_args.push_back (value_from_pointer (lookup_pointer_type (values_type), struct_addr)); new_args.insert (new_args.end (), args.begin (), args.end ()); ... reserves 'size()' entries, but then proceeds to push one extra one. This shouldn't have any really bad effects, as insert will grow the vector. Still, it seems better to use the correct size if we're going to bother calling reserve. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30780 Reviewed-by: John Baldwin --=20 You are receiving this mail because: You are on the CC list for the bug.=