[Lldb-commits] [lldb] b4e1af0 - [lldb-dap] Always pass disableASLR to the DAP executable (#113891)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 29 11:40:10 PDT 2024
Author: Michael Buch
Date: 2024-10-29T18:40:06Z
New Revision: b4e1af0096fd05ed4bddf11b48b604d75a7103d0
URL: https://github.com/llvm/llvm-project/commit/b4e1af0096fd05ed4bddf11b48b604d75a7103d0
DIFF: https://github.com/llvm/llvm-project/commit/b4e1af0096fd05ed4bddf11b48b604d75a7103d0.diff
LOG: [lldb-dap] Always pass disableASLR to the DAP executable (#113891)
More context can be found in
https://github.com/llvm/llvm-project/pull/110303
For DAP tests running in constrained environments (e.g., Docker
containers), disabling ASLR isn't allowed. So we set `disableASLR=False`
(since https://github.com/llvm/llvm-project/pull/113593).
However, the `dap_server.py` will currently only forward the value
of `disableASLR` to the DAP executable if it's set to `True`. If the
DAP executable wasn't provided a `disableASLR` field it defaults to
`true` too:
https://github.com/llvm/llvm-project/blob/f14743794587db102c6d1b20f9c87a1ac20decfd/lldb/tools/lldb-dap/lldb-dap.cpp#L2103-L2104
This means that passing `disableASLR=False` from the tests is currently
not possible.
This is also true for many of the other boolean arguments of
`request_launch`. But this patch only addresses `disableASLR` for now
since it's blocking a libc++ patch.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
index 63748a71f1122d..c29992ce9c7848 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
@@ -793,8 +793,6 @@ def request_launch(
args_dict["env"] = env
if stopOnEntry:
args_dict["stopOnEntry"] = stopOnEntry
- if disableASLR:
- args_dict["disableASLR"] = disableASLR
if disableSTDIO:
args_dict["disableSTDIO"] = disableSTDIO
if shellExpandArguments:
@@ -829,6 +827,7 @@ def request_launch(
if customThreadFormat:
args_dict["customThreadFormat"] = customThreadFormat
+ args_dict["disableASLR"] = disableASLR
args_dict["enableAutoVariableSummaries"] = enableAutoVariableSummaries
args_dict["enableSyntheticChildDebugging"] = enableSyntheticChildDebugging
args_dict["displayExtendedBacktrace"] = displayExtendedBacktrace
More information about the lldb-commits
mailing list