[all-commits] [llvm/llvm-project] ff67b6: [lldb] On POSIX, check for duplicate interpreter m...
David Spickett via All-commits
all-commits at lists.llvm.org
Wed Oct 25 02:13:00 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ff67b68e43db5b4feb46670445561fab976fb0ef
https://github.com/llvm/llvm-project/commit/ff67b68e43db5b4feb46670445561fab976fb0ef
Author: David Spickett <david.spickett at linaro.org>
Date: 2023-10-25 (Wed, 25 Oct 2023)
Changed paths:
M lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
Log Message:
-----------
[lldb] On POSIX, check for duplicate interpreter modules without loading them (#69932)
Fixes #68987
Early on we load the interpreter (most commonly ld-linux) in
LoadInterpreterModule. Then later when we get the first DYLD rendezvous
we get a list of libraries that commonly includes ld-linux again.
Previously we would load this duplicate, see that it was a duplicate,
and unload it.
Problem was that this unloaded the section information of the first copy
of ld-linux. On platforms where you can place a breakpoint using only an
address, this wasn't an issue.
On ARM you have ARM and Thumb modes. We must know which one the section
we're breaking in is, otherwise we'll go there in the wrong mode and
SIGILL. This happened on ARM when lldb tried to call mmap during
expression evaluation.
To fix this, I am making the assumption that the base address we see in
the module prior to loading can be compared with what we know the
interpreter base address is. Then we don't have to load the module to
know we can ignore it.
This fixes the lldb test suite on Ubuntu versions where
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1927192 has been
fixed. Which was recently done on Jammy.
More information about the All-commits
mailing list