[Bug symtab/31694] heap-use-after-free in index-cache

bernd.edlinger at hotmail dot de sourceware-bugzilla@sourceware.org
Sat May 4 07:29:34 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31694

Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger at hotmail dot de

--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
ed29a346be439466ff2a5ce33e715e02c49fbdac is the first bad commit
commit ed29a346be439466ff2a5ce33e715e02c49fbdac
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jan 28 09:14:04 2024 -0700

    Avoid race when writing to index cache

    The background DWARF reader changes introduced a race when writing to
    the index cache.  The problem here is that constructing the
    index_cache_store_context object should only happen on the main
    thread, to ensure that the various value captures do not race.

    This patch adds an assert to the construct to that effect, and then
    arranges for this object to be constructed by the cooked_index_worker
    constructor -- which is only invoked on the main thread.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31262

 gdb/dwarf2/cooked-index.c | 27 ++++++++++++---------------
 gdb/dwarf2/cooked-index.h | 15 ++++++++++-----
 gdb/dwarf2/index-cache.c  |  4 ++++
 3 files changed, 26 insertions(+), 20 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list