[PATCH 1/5] [COVER-LETTER, RFC] Fix some fsanitize=thread issues in gdb's cooked index

Tom de Vries tdevries@suse.de
Wed Jun 29 15:29:10 GMT 2022


This is an attempt at fixing some gdb thread sanitizer issues.

I used gcc 12 and -fsanitize=thread.

The patches address problems in the parallel reading of the cooked index.

There are a few problems remaining when testing:
- FAILs in test-case gdb.base/early-init-file.exp, submitted test-case patch
  at https://sourceware.org/pipermail/gdb-patches/2022-June/190343.html
- we have a heap-use-after-free in gdb.dwarf2/dw2-icc-opaque.exp.
  Not thread-related, filed at
  https://sourceware.org/bugzilla/show_bug.cgi?id=29295.
- we run into timeouts in several test-cases:
  - gdb.gdb/python-helper.exp
  - gdb.multi/multi-target-thread-find.exp
  - gdb.threads/break-while-running.exp
  - gdb.threads/detach-step-over.exp
  - gdb.threads/fork-thread-pending.exp
  - gdb.threads/next-fork-other-thread.exp
  - gdb.threads/pending-fork-event-detach.exp
  - gdb.threads/wp-replication.exp
  presumably due to sanitizer overhead.
- with tui tests, at the point of calling newterm we run into
  "WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong
  thread)".  This is reproducible in a standalone test-case calling newterm,
  so not related to gdb.  Affects:
  - gdb.python/tui-window.exp
  - gdb.tui/basic.exp
  - gdb.tui/empty.exp
  - gdb.tui/list.exp
  - gdb.tui/new-layout.exp
  - gdb.tui/regs.exp
  - gdb.tui/tui-missing-src.exp
  - gdb.tui/winheight.exp
  - gdb.tui/winwidth.exp
- We run into 4 reported data races in gdb.base/gdb-sigterm.exp, filed at
  https://sourceware.org/bugzilla/show_bug.cgi?id=29297.
---
 gdb/COVER-LETTER | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 gdb/COVER-LETTER

diff --git a/gdb/COVER-LETTER b/gdb/COVER-LETTER
new file mode 100644
index 00000000000..e69de29bb2d

base-commit: 9117c7b452ef76304f4394a97c887d0c4af439f5
-- 
2.35.3



More information about the Gdb-patches mailing list