Skip to content

Commit

Permalink
[lldb-dap] Always pass disableASLR to the DAP executable
Browse files Browse the repository at this point in the history
More context can be found in
llvm#110303

For DAP tests running in constrained environments (e.g., Docker
containers), disabling ASLR isn't allowed. So we set `disableASLR=False`
(since llvm#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.
  • Loading branch information
Michael137 committed Oct 28, 2024
1 parent 0c676a6 commit e835592
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e835592

Please sign in to comment.