Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Doug Evans <dje@google.com>
Cc: Pedro Alves <palves@redhat.com>,
	gdb-patches <gdb-patches@sourceware.org>,
	Jerome Guitton <guitton@adacore.com>
Subject: Re: [RFA/commit] Memory leak in on reading frame register
Date: Sat, 16 May 2015 00:03:00 -0000	[thread overview]
Message-ID: <20150516000349.GM4767@adacore.com> (raw)
In-Reply-To: <CADPb22TgSUX6zj9SGd_1cgfmHOnhr4i1ecDy7qozigDOG_1qCA@mail.gmail.com>

> > gdb/ChangeLog:
> >
> >         * infrun.c (handle_inferior_event_1): Renames handle_inferior_event.
> >         (handle_inferior_event): New function.
> >
> > Tested on x86_64-linux. No regression.
> 
> Not that this has to be changed here, but I'm wondering why all value
> mark/frees aren't done via cleanups. I can imagine sometimes it's not,
> technically, necessary, and I can imagine there's some history/inertia
> here, but having two ways to do this (using a cleanup or not) leaves
> the reader having to wonder if using a cleanup was errantly skipped.

I guess it depends on whether you think you need the certainty of
the cleanup or not. I think both approaches are valid depending
on the context.

In this case, I asked myself that question, and I didn't see a real
need for it, since my thinking was that, if an exception occurs and
propagates through handle_inferior_event, then chances are it'll
propagate all the way, which would then lead to values being cleaned
up as well. So I went with the current pattern.

But I can change it to a cleanup if people prefer. I don't mind.

-- 
Joel


  reply	other threads:[~2015-05-16  0:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 15:55 Joel Brobecker
2015-05-11 10:55 ` Pedro Alves
2015-05-11 20:53   ` Joel Brobecker
2015-05-12  9:43     ` Pedro Alves
2015-05-15 15:58       ` Joel Brobecker
2015-05-15 22:35         ` Doug Evans
2015-05-16  0:03           ` Joel Brobecker [this message]
2015-05-19 10:04         ` Pedro Alves
2015-05-20  7:39           ` 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=20150516000349.GM4767@adacore.com \
    --to=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guitton@adacore.com \
    --cc=palves@redhat.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