public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix buffer overflow in ada-lang.c:move_bits
Date: Wed, 14 Nov 2018 23:17:00 -0000	[thread overview]
Message-ID: <20181114231724.GA4336@adacore.com> (raw)
In-Reply-To: <7628ab26-ad93-726c-f1d4-d5c60492115c@redhat.com>

> > gdb/ChangeLog:
> > 
> >         * ada-lang.c (move_bits): Delete. Update all callers to use
> >         copy_bitwise instead.
> >         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
> >         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
> >         Move from here to utils.c.
> >         (_initialize_dwarf2loc): Remove call to register copy_bitwise
> >         selftests.
> >         * utils.h (copy_bitwise): Add declaration.
> >         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
> >         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
> >         Moved here from dwarf2loc.c.
> >         (_initialize_utils): Register copy_bitwise selftests.
> > 
> > Thank you!
> > -- Joel
> > 
> > 
> 
> Great, thanks!
> 
> Nit, since the function is now public, I'd consider moving the unit
> tests to under gdb/unittests/ instead, like, to a new
> copy_bitwise-selftests.c file.  (I'm mildly thinking that'd be a better
> filename than utils-selftest.c because the function may well
> move again in the future.  Notice how gdb_realpath's unit tests
> were left behind in gdb/utils.c even though gdb_realpath moved to 
> common/pathstuff.c.)
> 
> If you do that, you can drop the
> '#if GDB_SELF_TEST' around the tests, since files in that
> directory are not compiled if unit tests are disabled.

I can do that. Since you said you're file reguardless, it's a little
easier for me to do it in two stages, so I'll go ahead and push this
one. I'll start on moving the unit tests again right after, and
will finish ASAP if it's not finished by end of today.

Thanks Pedro!
-- 
Joel

  reply	other threads:[~2018-11-14 23:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 16:21 Tom Tromey
2018-11-01 15:35 ` Joel Brobecker
2018-11-01 22:16   ` Tom Tromey
2018-11-08 19:11   ` Pedro Alves
2018-11-08 19:12     ` Pedro Alves
2018-11-09 17:16       ` Joel Brobecker
2018-11-14 17:11         ` Joel Brobecker
2018-11-14 17:23           ` Pedro Alves
2018-11-14 23:17             ` Joel Brobecker [this message]
2018-11-15  0:02               ` [RFA] Move copy_bitwise unittests to own unittest file (was: "Re: [PATCH] Fix buffer overflow in ada-lang.c:move_bits") Joel Brobecker
2018-11-15 10:59                 ` [RFA] Move copy_bitwise unittests to own unittest file Pedro Alves
2018-11-15 15:56                   ` pushed: " Joel Brobecker

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=20181114231724.GA4336@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tom@tromey.com \
    /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).