public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	 Pedro Alves <pedro@palves.net>
Subject: Re: [PATCH] Fix heap-use-after-free in index-cached with --disable-threading
Date: Sat, 11 May 2024 10:47:36 +0000 (UTC)	[thread overview]
Message-ID: <2070125856.1678800.1715424457106@mail.yahoo.com> (raw)
In-Reply-To: <724b9a77-ca0b-4014-a19d-c187580400e2@palves.net>

 Am Freitag, 10. Mai 2024 um 21:16:51 MESZ hat Pedro Alves <pedro@palves.net> Folgendes geschrieben:

> On 2024-05-04 12:09, Hannes Domani wrote:
>
>
> > --- a/gdb/dwarf2/cooked-index.c
> > +++ b/gdb/dwarf2/cooked-index.c
> > @@ -513,7 +513,7 @@ cooked_index_worker::wait (cooked_state desired_state, bool allow_quit)
> >  #else
> >    /* Without threads, all the work is done immediately on the main
> >      thread, and there is never anything to wait for.  */
> > -  done = true;
> > +  done = desired_state == cooked_state::CACHE_DONE;
>
>
> I know nothing about this code, but I wondered if the "never" above in the comment
> should say something else.  It matched the old code that just assigned to true, but
> now it's conditional, which doesn't read like "never".

The waiting is done in the #if CXX_STD_THREAD block above, and none of
it is done in this #else block, so the comment is still fine.


Hannes

      reply	other threads:[~2024-05-11 10:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240504110942.922-1-ssbssa.ref@yahoo.de>
2024-05-04 11:09 ` Hannes Domani
2024-05-04 15:45   ` Tom Tromey
2024-05-04 16:28     ` Hannes Domani
2024-05-04 16:56     ` Hannes Domani
2024-05-10  5:59       ` Bernd Edlinger
2024-05-10 13:50         ` Hannes Domani
2024-05-10 18:03         ` Tom Tromey
2024-05-11  6:44           ` Bernd Edlinger
2024-05-10 19:16   ` Pedro Alves
2024-05-11 10:47     ` Hannes Domani [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=2070125856.1678800.1715424457106@mail.yahoo.com \
    --to=ssbssa@yahoo.de \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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).