public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix race in DWARF reader, 2nd approach
@ 2024-04-16 17:05 Tom Tromey
  2024-04-16 17:05 ` [PATCH 1/5] Remove call to dwarf2_per_objfile::adjust from ranges readers Tom Tromey
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Tom Tromey @ 2024-04-16 17:05 UTC (permalink / raw)
  To: gdb-patches

This series is a different approach to fixing the race pointed out in
PR gdb/31261.  The problem there is that the indexer can be running at
the same time that an objfile is relocated, resulting in races in
dwarf2_per_objfile::adjust.

The previous series to fix this problem is here:

https://inbox.sourceware.org/gdb-patches/20240217-dwarf-race-relocate-v1-0-d3d2d908c1e8@tromey.com/

This series is less invasive and works by justifying the eventual
removal of the 'adjust' method.

Regression tested on x86-64 Fedora 38.

I also tested this in a small way on a MIPS executable.  I don't have
access to a machine where I can truly test MIPS16 in its entirety, but
what I did is make an executable where one function was marked
__attribute__((mips16)).  Then, I tested that the symbol side of gdb
still correctly applies the address transform in "break" and
"disassemble" commands with this series applied.

---
Tom Tromey (5):
      Remove call to dwarf2_per_objfile::adjust from ranges readers
      Remove more calls to dwarf2_per_objfile::adjust
      Remove call to dwarf2_per_objfile::adjust from read_call_site_scope
      Remove call to dwarf2_per_objfile::adjust from read_attribute_value
      Remove dwarf2_per_objfile::adjust

 gdb/dwarf2/aranges.c        |  2 --
 gdb/dwarf2/read-gdb-index.c |  2 --
 gdb/dwarf2/read.c           | 45 ++++++++++-----------------------------------
 gdb/dwarf2/read.h           |  4 ----
 4 files changed, 10 insertions(+), 43 deletions(-)
---
base-commit: 12f5356130c2cda10e2589e74a8716563050dccb
change-id: 20240416-dwarf-race-relocate-2-621894b33715

Best regards,
-- 
Tom Tromey <tom@tromey.com>


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 17:05 [PATCH 0/5] Fix race in DWARF reader, 2nd approach Tom Tromey
2024-04-16 17:05 ` [PATCH 1/5] Remove call to dwarf2_per_objfile::adjust from ranges readers Tom Tromey
2024-04-29 12:59   ` Andrew Burgess
2024-04-29 13:16     ` Andrew Burgess
2024-04-29 14:36       ` Andrew Burgess
2024-04-29 20:04     ` Tom Tromey
2024-05-01 14:56       ` Andrew Burgess
2024-05-04 15:30         ` Tom Tromey
2024-04-16 17:05 ` [PATCH 2/5] Remove more calls to dwarf2_per_objfile::adjust Tom Tromey
2024-04-16 17:05 ` [PATCH 3/5] Remove call to dwarf2_per_objfile::adjust from read_call_site_scope Tom Tromey
2024-04-16 17:05 ` [PATCH 4/5] Remove call to dwarf2_per_objfile::adjust from read_attribute_value Tom Tromey
2024-04-16 17:05 ` [PATCH 5/5] Remove dwarf2_per_objfile::adjust Tom Tromey

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