public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Tom Tromey <tom@tromey.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH 2/2] Avoid cache race in bfd_check_format_matches
Date: Wed, 10 Apr 2024 13:16:02 +0930	[thread overview]
Message-ID: <ZhYLesGNW4IEienV@squeak.grove.modra.org> (raw)
In-Reply-To: <20240324211229.1444550-3-tom@tromey.com>

On Sun, Mar 24, 2024 at 03:08:06PM -0600, Tom Tromey wrote:
> Running the gdb test suite with the thread sanitizer enabled shows a
> race when bfd_check_format_matches and bfd_cache_close_all are called
> simultaneously on different threads.
> 
> This patch fixes this race by having bfd_check_format_matches
> temporarily remove the BFD from the file descriptor cache -- leaving
> it open while format-checking proceeds.

This all looks OK.

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2024-04-10  3:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 21:08 [PATCH 0/2] Fix some races seen by thread sanitizer Tom Tromey
2024-03-24 21:08 ` [PATCH 1/2] Thread-safety improvements for bfd_check_format_matches Tom Tromey
2024-03-29 18:17   ` Tom Tromey
2024-04-10  3:39   ` Alan Modra
2024-04-15 18:14     ` Tom Tromey
2024-03-24 21:08 ` [PATCH 2/2] Avoid cache race in bfd_check_format_matches Tom Tromey
2024-04-10  3:46   ` Alan Modra [this message]
2024-04-09 16:13 ` [PATCH 0/2] Fix some races seen by thread sanitizer Tom Tromey
2024-04-12 13:03 ` Nick Clifton

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=ZhYLesGNW4IEienV@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --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).