[0/2] Fix a data race with the background DWARF reader

Message ID 20241017-fix-race-pr-symtab-31626-v1-0-3a53459e9651@tromey.com
Headers
Series Fix a data race with the background DWARF reader |

Message

Tom Tromey Oct. 18, 2024, 12:02 a.m. UTC
  This series fixes a race in the background DWARF reader.

I was able to reproduce the original race manually (though not via
dejagnu), and then confirmed (at least, there weren't warnings from
TSAN) that this series fixes the problem.

---
Tom Tromey (2):
      Use gdb_bfd_get_full_section_contents in auto-load.c
      Add locking when reading BFD sections

 gdb/auto-load.c | 11 ++++-------
 gdb/gdb_bfd.c   | 23 +++++++++++++++++++++++
 2 files changed, 27 insertions(+), 7 deletions(-)
---
base-commit: 876f0e78ba8244aa5705530fd8522928f05e6783
change-id: 20241017-fix-race-pr-symtab-31626-e88148cf55a2

Best regards,
  

Comments

Kevin Buettner Oct. 23, 2024, 10:30 p.m. UTC | #1
On Thu, 17 Oct 2024 18:02:36 -0600
Tom Tromey <tom@tromey.com> wrote:

> This series fixes a race in the background DWARF reader.
> 
> I was able to reproduce the original race manually (though not via
> dejagnu), and then confirmed (at least, there weren't warnings from
> TSAN) that this series fixes the problem.
> 
> ---
> Tom Tromey (2):
>       Use gdb_bfd_get_full_section_contents in auto-load.c
>       Add locking when reading BFD sections
> 
>  gdb/auto-load.c | 11 ++++-------
>  gdb/gdb_bfd.c   | 23 +++++++++++++++++++++++
>  2 files changed, 27 insertions(+), 7 deletions(-)
> ---
> base-commit: 876f0e78ba8244aa5705530fd8522928f05e6783
> change-id: 20241017-fix-race-pr-symtab-31626-e88148cf55a2
> 
> Best regards,
> -- 
> Tom Tromey <tom@tromey.com>
> 

Both patches LGTM.

Reviewed-by: Kevin Buettner <kevinb@redhat.com>