[all-commits] [llvm/llvm-project] 309596: [LLDB] Ensure the data of apple accelerator tables...
Walter Erquinigo via All-commits
all-commits at lists.llvm.org
Fri Nov 10 18:54:11 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 309596f2497755b371bacff9d72d094a2c942042
https://github.com/llvm/llvm-project/commit/309596f2497755b371bacff9d72d094a2c942042
Author: Walter Erquinigo <a20012251 at gmail.com>
Date: 2023-11-10 (Fri, 10 Nov 2023)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
M lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
Log Message:
-----------
[LLDB] Ensure the data of apple accelerator tables is kept around (#71828)
lldb's AppleDWARFIndex is created with a few
`llvm::AppleAcceleratorTable` variables, but they only hold pointers to
the underlying data, which doesn't prevent the data owner (lldb's
DataBufferHeap) from being disposed.
Because of this, an asan build of lldb was showing an error in which a
jitted accelerator table was being fred before read, which made my lldb
fall in an infinite loop trying to parse corrupted accel table data.
This issue only happens when I'm using a jitted execution and not when
debugging a precompiled binary, probably because in the jit case the
underlying data has to necessarily be copied via gdb-remote instead of
mmaping a debug info file.
The correct fix seems to also store the underlying storage along with
the accelerator tables in AppleDWARFIndex.
More information about the All-commits
mailing list