Skip to content
Unverified Commit 309596f2 authored by Walter Erquinigo's avatar Walter Erquinigo Committed by GitHub
Browse files

[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.
parent 00c3c731
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment