aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-11-09 13:45:50 -0700
committerTom Tromey <tom@tromey.com>2024-12-12 15:17:39 -0700
commita357defdfe2af758d5ec9f0040949bf1db4cbe53 (patch)
tree083ad517656fad650c0c582fe09ea7f589187bec /gdb/cli
parente1093de6a0feeb44a6a2f3bb4509d35eb28bcb66 (diff)
downloadbinutils-a357defdfe2af758d5ec9f0040949bf1db4cbe53.zip
binutils-a357defdfe2af758d5ec9f0040949bf1db4cbe53.tar.gz
binutils-a357defdfe2af758d5ec9f0040949bf1db4cbe53.tar.bz2
Lock bfd_stat and bfd_get_mtime
PR gdb/31713 points out some races when using the background DWARF reader. This particular patch fixes some of these, namely the ones when using the sim. In this case, the 'load' command calls reopen_exec_file, which calls bfd_stat, which introduces a race. BFD only locks globals -- concurrent use of a single BFD must be handled by the application. To this end, this patch adds locked wrappers for bfd_stat and bfd_get_mtime. I couldn't reproduce these data races but the original reporter tested the patch and confirms that it helps. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31713 Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/cli')
0 files changed, 0 insertions, 0 deletions