Skip to content

Commit f46da03

Browse files
authored
[lldb] Don't enable ASLR for the Wasm runtime (#193115)
We're launching the Wasm runtime (a native host binary), not the target being debugged. Clear flags that don't apply to the runtime process.
1 parent 6fe6f1b commit f46da03

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lldb/source/Plugins/Platform/WebAssembly/PlatformWasm.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ lldb::ProcessSP PlatformWasm::DebugProcess(ProcessLaunchInfo &launch_info,
175175

176176
launch_info.SetArguments(args, true);
177177
launch_info.SetLaunchInSeparateProcessGroup(true);
178-
launch_info.GetFlags().Clear(eLaunchFlagDebug);
178+
// We're launching the Wasm runtime (a native host binary), not the target
179+
// being debugged. Clear flags that don't apply to the runtime process.
180+
launch_info.GetFlags().Clear(eLaunchFlagDebug | eLaunchFlagDisableASLR);
179181
launch_info.GetEnvironment() = Host::GetEnvironment();
180182

181183
auto exit_code = std::make_shared<std::optional<int>>();

0 commit comments

Comments
 (0)