public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix some races seen by thread sanitizer
@ 2024-03-24 21:08 Tom Tromey
  2024-03-24 21:08 ` [PATCH 1/2] Thread-safety improvements for bfd_check_format_matches Tom Tromey
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tom Tromey @ 2024-03-24 21:08 UTC (permalink / raw)
  To: binutils

PR gdb/31264 points out some reports from thread sanitizer when
running some gdb tests.

I couldn't reproduce exactly these reports, but I did find that
bfd_check_format_matches uses some globals without locking, which is
definitely not thread-safe.  These are fixed in patch #1.

And, when working on this, I did manage to get other thread sanitizer
reports from the same gdb test case -- a problem when
bfd_check_format_matches is called simultaneously with
bfd_cache_close_all.  This is fixed in patch #2.

For patch #1, the per-xvec error-emission code was written to fix some
fuzzer bug, but I don't have access to the original test file here, so
I wasn't really able to test that the reimplementation is correct.

For patch #2, see the note in that commit about the archive case in
bfd_cache_lookup_worker.

Let me know what you think.

Tom


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-15 18:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2024-04-09 16:13 ` [PATCH 0/2] Fix some races seen by thread sanitizer Tom Tromey
2024-04-12 13:03 ` Nick Clifton

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).