public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-30780-4717-qzyd8oQIgc@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30780-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30780 --- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=28bb48114db4de4ba0a72940af1c30728b6e82f2 commit 28bb48114db4de4ba0a72940af1c30728b6e82f2 Author: Tom Tromey <tromey@adacore.com> 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=30780 Reviewed-by: John Baldwin <jhb@FreeBSD.org> -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-08-18 19:07 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-18 10:00 [Bug build/30780] New: " sam at gentoo dot org 2023-08-18 10:00 ` [Bug build/30780] " sam at gentoo dot org 2023-08-18 10:10 ` arsen at sourceware dot org 2023-08-18 13:46 ` tromey at sourceware dot org 2023-08-18 14:05 ` tromey at sourceware dot org 2023-08-18 19:07 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-19 6:49 ` sam at gentoo dot org 2023-08-19 6:51 ` [Bug build/30780] gdb: -Werror=stringop-overflow build failure with -D_GLIBCXX_ASSERTIONS sam at gentoo dot org 2023-08-28 13:49 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30780-4717-qzyd8oQIgc@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).