From: Kevin Buettner <kevinb@redhat.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/symtab] Fix overly large gdb-index file check for 32-bit
Date: Fri, 15 Sep 2023 14:38:39 -0700 [thread overview]
Message-ID: <20230915143839.577e6a86@f37-zws-nv> (raw)
In-Reply-To: <20230915090837.16945-1-tdevries@suse.de>
On Fri, 15 Sep 2023 11:08:37 +0200
Tom de Vries <tdevries@suse.de> wrote:
> Add a unit test which checks that write_gdb_index_1 will throw
> an error when the size of the file would exceed the maximum value
> capable of being represented by 'offset_type'.
>
> The unit test fails on 32-bit systems due to wrapping overflow. Fix this by
> changing the type of total_len in write_gdbindex_1 from size_t to uint64_t.
>
> Tested on x86_64-linux.
>
> Co-Authored-By: Kevin Buettner <kevinb@redhat.com>
> ---
> gdb/dwarf2/index-write.c | 84 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 82 insertions(+), 2 deletions(-)
Thanks for adding the additional test along with fixing the wrapping
overflow problem on 32-bit systems.
Approved-by: Kevin Buettner <kevinb@redhat.com>
prev parent reply other threads:[~2023-09-15 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 9:08 Tom de Vries
2023-09-15 21:38 ` Kevin Buettner [this message]
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=20230915143839.577e6a86@f37-zws-nv \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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: link
Be 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).