Skip to content

Commit e835592

Browse files
committed
[lldb-dap] Always pass disableASLR to the DAP executable
More context can be found in #110303 For DAP tests running in constrained environments (e.g., Docker containers), disabling ASLR isn't allowed. So we set `disableASLR=False` (since #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.
1 parent 0c676a6 commit e835592

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,6 @@ def request_launch(
793793
args_dict["env"] = env
794794
if stopOnEntry:
795795
args_dict["stopOnEntry"] = stopOnEntry
796-
if disableASLR:
797-
args_dict["disableASLR"] = disableASLR
798796
if disableSTDIO:
799797
args_dict["disableSTDIO"] = disableSTDIO
800798
if shellExpandArguments:
@@ -829,6 +827,7 @@ def request_launch(
829827
if customThreadFormat:
830828
args_dict["customThreadFormat"] = customThreadFormat
831829

830+
args_dict["disableASLR"] = disableASLR
832831
args_dict["enableAutoVariableSummaries"] = enableAutoVariableSummaries
833832
args_dict["enableSyntheticChildDebugging"] = enableSyntheticChildDebugging
834833
args_dict["displayExtendedBacktrace"] = displayExtendedBacktrace

0 commit comments

Comments
 (0)